Spread Operator
suggest changefunction myFunction(x, y, z) { }
var args = [0, 1, 2];
myFunction(...args);
Spread expands an array where a call expects separate arguments, or where an array literal expects elements. Put ... in front of the array. Rest parameters use the same punctuation on the way into a function.
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents