The spread operator is the opposite of the rest operator, though it looks the same.

Spread Examples


let numbers = [1,2,3,4,5];

console.log(Math.max(numbers))
1
2
3
4

let numbers = [1,2,3,4,5];

console.log(Math.max(...numbers))
1
2
3
4
Last Updated: 8/11/2019, 10:51:29 PM