-
function bar(x =2, ...args
) : …args makes an array of all the rest of the arguments of the function
-
function bar() { return foo(...[2,5]) }) : … args spreads the array as individual parameters
Handy javascript snippets
Published inJS
function bar(x =2, ...args
) : …args makes an array of all the rest of the arguments of the function
function bar() {
return foo(...[2,5])
}
) : … args spreads the array as individual parameters
Be First to Comment