I\'m attempting the following:
var a1 = [\'a\', \'e\', \'f\']; // [a, e, f] var a2 = [\'b\', \'c\', \'d\']; // [b, c, d] a1.splice(1, 0, a2); // expe
With ES6, you can use the spread operator. It makes it much more concise and readable.
var a1 = ['a', 'e', 'f']; var a2 = ['b', 'c', 'd']; a1.splice(1, 0, ...a2); console.log(a1)