Basic Algorithm Scripting: Slice and Splice help please

Basic Algorithm Scripting: Slice and Splice help please
0
function frankenSplice(arr1, arr2, n) {
  // It's alive. It's alive!
  let array1 = arr1;
  let array2 = arr2;

  let arr = array2;
  arr.splice(n,0,array1);
  return arr;
}

frankenSplice(["claw", "tentacle"], ["head", "shoulders", "knees", "toes"], 2);//

Why isn’t it passing the test? I am not changing arr1 and arr2. My output which is arr is matching all the cases when I use console.log(arr); but failing the actual test cases. I am really confused.

that is not how you copy an array, you need to use slice,concat or the spread operator

on the other issue, you are inserting an array in the array, but you would need to put in the elements of the array

maybe a tool like this can be helpful for you: http://pythontutor.com/javascript.html