spread operator in Javascript ES6
The spread operator in Javascript ES6 uses three dots …
It also returns 15 to the browser. Except that the dot-dot-dot is in the caller and not in the function definition. The function “adder” as defined takes exactly three values. But the caller has an array “numbers” containing three values. The spread operator take each of these values and turns them into three values that the function is expecting.
Spread operators make it more convenient to work with arrays. For example…