JavaScript Spread Operator

Posted by Joe Enos on March 11, 2021 · 1 min read

With JavaScript's spread operator, you can clone an array, or inject the values into another array, or into the parameters of a function.

You also can combine the properties of two objects when you build it using an object literal.

View code on GitHub