Slice and Splice
function frankenSplice(arr1, arr2, n) {
let a2_1 = arr2.slice(0, n)
let a2_2 = arr2.slice(n)
let arr3 = [...a2_1, ...arr1, ...a2_2]
return arr3;
}
frankenSplice([1, 2, 3], [4, 5, 6], 1);
function frankenSplice(arr1, arr2, n) {
let a2_1 = arr2.slice(0, n)
let a2_2 = arr2.slice(n)
let arr3 = [...a2_1, ...arr1, ...a2_2]
return arr3;
}
frankenSplice([1, 2, 3], [4, 5, 6], 1);