The rest parameter syntax allows for representing an indefinite number of arguments as an array.
function myFunc(...myArgs) {
console.log(myArgs);
}
myFunc('a', 123, true); // ["a", 123, true]
The rest parameter syntax allows for representing an indefinite number of arguments as an array.
function myFunc(...myArgs) {
console.log(myArgs);
}
myFunc('a', 123, true); // ["a", 123, true]