Hacker News new | ask | show | jobs
by Ajedi32 2512 days ago
For what it's worth, there are only two, maybe three methods in that entire list that mutate where it's not obvious: sort, reverse, and (maybe) splice. All the other methods (like push, pop, fill, etc) are methods whose entire purpose is to mutate the array.
1 comments

That was my first impression. But then the same logic applies to concat. ("I want to add another array").
Sometimes I don’t. Actually usually I don’t, I do a lot of [].concat(a, b).