Maybe it's a little bit longer, but you don't have to create an array just to use the prototypes concat method.
you could also write that one:
nice, thanks for sharing that 👍
Just for fun I tried it on jsperf and the first one is way faster. Never thought that. But it's probably just a micro optimization.
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.