loading...

re: 5 Uses for the Spread Operator VIEW POST

TOP OF THREAD FULL DISCUSSION
re: Great stuff. Note that spread operator works also in deconstruction too, not only construction: Take first (or n first) fields of an array: let ...
 

Likewise for objects, can be used to create a new one that omits certain properties.

const {a, ...rest} = {a: 1, b: 2, c: 3};
Code of Conduct Report abuse