Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript spread operator

var num = [2, 4, 6, 8, 10];
console.log(...num)
//expected output: 2 4 6 8 10
console.log(88, ...num, 99)
//expected output: 88 2 4 6 8 10 99
Source by developer.mozilla.org #
 
PREVIOUS NEXT
Tagged: #javascript #spread #operator
ADD COMMENT
Topic
Name
7+4 =