DEV Community

Discussion on: 5 Uses for the Spread Operator

Collapse
 
laurieontech profile image
Laurie

It depends on the JS engine running, i.e. chrome vs safari. My understanding is that slice used to be more performant but that gap has been cut significantly and on many browsers, the spread operator is the same, or possibly better performance wise.

And since slice() only works for arrays, the spread operator is a more powerful piece of syntax.

Collapse
 
darksmile92 profile image
Robin Kretzschmar

Thanks for the answer, wasn't aware of it but a quick research confirmed it :)