In the below code,
function myFunction(x, y, z) { }
var args = [0, 1, 2];
myFunction(...args);
Is spread operator(...) unpacki
Yes, as per the page that contains the example you posted:
The spread operator allows an expression to be expanded in places where multiple arguments (for function calls) or multiple elements (for array literals) are expected.
Running the following through an ES6 transpiler:
function myFunction(x, y, z) {
console.log(x,y,z);
}
var args = [0, 1, 2];
myFunction(...args);
produces:
function myFunction(x, y, z) {
console.log(x, y, z);
}
var args = [0, 1, 2];
myFunction.apply(undefined, args);
which logs 0 1 2, showing it has expanded the args array.