Spread Operator and Rest Parameters

Learn how to easily combine Array with the spread operator and much more.

The Spread operator #

According to MDN:

Spread syntax allows an iterable such as an array expression or string to be expanded in places where zero or more arguments (for function calls) or elements (for array literals) are expected, or an object expression to be expanded in places where zero or more key-value pairs (for object literals) are expected.

 

Combine arrays #

Get hands-on with 1200+ tech skills courses.