JavaScript · Language basics
Spread syntax
Expands an iterable into a new array, object or argument list without mutating the original.
Syntax
[...a, ...b]Example
Try it
Notes
Spread copies are shallow. Nested objects are still shared.
More in this group
Learn this in the course
Reference pages are the quick answer. The course explains the why, shows the full example and ends with a challenge.