ES6 Rest parameters
The rest parameter syntax allows us to represent an indefinite number of arguments as an array. If you prefix a parameter name with the rest operator (…), the parameter receives all remaining parameters via an Array. Only the last parameter can be a “rest parameter”. This syntax was introduced in ECMAScript 2015(commonly called as ES6).
References
Categories :
ES6
JavaScript