Answers for "How javascript spread operator works?"

0

How javascript spread operator works?

var num = [2, 4, 6, 8, 10];
console.log(...num)
//expected output: 2 4 6 8 10
console.log(88, ...num, 99) 
// added extra new elements before and after the spread operator
//expected output: 88 2 4 6 8 10 99
Posted by: Guest on September-03-2021

Code answers related to "How javascript spread operator works?"

Code answers related to "Javascript"

Browse Popular Code Answers by Language