Why doesn't Array.push.apply work?
The current version of JS allows you to unpack an array into the arguments.
var a = [1, 2, 3, 4, 5,];var b = [6, 7, 8, 9];a.push(...b); //[1, 2, 3, 4, 5, 6, 7, 8, 9];
The current version of JS allows you to unpack an array into the arguments.
var a = [1, 2, 3, 4, 5,];var b = [6, 7, 8, 9];a.push(...b); //[1, 2, 3, 4, 5, 6, 7, 8, 9];