The Spread Operator

Get an introduction to the spread operator and learn about its advantages over the apply function with examples.

The spread operator looks the same as the (...) symbol used for the rest parameter. However, it is used when calling a function instead of in the parameter list.

The spread operator’s intention is the opposite of the rest parameter’s—spread breaks a collection into discrete values, whereas rest gathers discrete values into an array.

Since they are used in two different contexts, there should be no confusion.

Difference between the rest parameter and the spread operator

Get hands-on with 1200+ tech skills courses.