There doesn\'t seem to be a way to extend an existing JavaScript array with another array, i.e. to emulate Python\'s extend
method.
I want to achieve th
Super simple, does not count on spread operators or apply, if that's an issue.
b.map(x => a.push(x));
After running some performance tests on this, it's terribly slow, but answers the question in regards to not creating a new array. Concat is significantly faster, even jQuery's $.merge()
whoops it.
https://jsperf.com/merge-arrays19b/1