loading
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
function frankenSplice(arr1, arr2, n) {
  // It's alive. It's alive!
  let arr3 = arr2.slice();
  arr3.splice(n, 0, arr1);

  console.log(arr3); 
  return arr3;
}


frankenSplice([1, 2, 3], [4, 5, 6], 1);
frankenSplice([1, 2, 3], [4, 5], 1)
frankenSplice([1, 2], ["a", "b"], 1)
frankenSplice(["claw", "tentacle"], ["head", "shoulders", "knees", "toes"], 2) 
node v10.16.0