how to add an item at an index to an array in Javascriot code example Example: javascript add array to array at index a1.splice(2, 0, ...a2);