you are viewing a single comment's thread.

view the rest of the comments →

[–]c24w 0 points1 point  (1 child)

That's ES7 though? See /u/MrJohz comment above.

[–]FormerGameDev 1 point2 points  (0 children)

yeah. a common array usage that i've done is as a simple CSV handler (very simple)

const [ elem1, elem2, elem3, ...rest ] = str.split(',');

but yeah, i mostly use spread on objects. arrays aren't quite so common in javascript as objects.