DEV Community

Discussion on: Merging Two or More Arrays in JavaScript

Collapse
 
queekusme profile image
Annie Kennedy

I dunno if there are any performance implications but I always do
[
…arr1,
…arr2
]

With the spread operator

Collapse
 
natclark profile image
Nathan

Interesting, I'm not sure what the performance implications would be. If I had time, I'd run a few quick tests to see!