DEV Community

Discussion on: Javascript Array.push is 945x faster than Array.concat 🤯🤔

Collapse
 
brokenthorn profile image
Paul-Sebastian Manole

Might want to mention what the spread operator actually does, which is to spread the one argument to array.push(...arg) to multiple arguments like so: array.push(arg[0], arg[1], arg[2], ..., arg[n]).

Collapse
 
shiling profile image
Shi Ling

You're right, I didn't realise that people might not know what the ES6 spread operator does. Updated the article - thanks!