Slice and Splice I can't get to pass the last task "The second array should remain the same after the function runs". Please help

Tell us what’s happening:

Your code so far


function frankenSplice(arr1, arr2, n) {
  // It's alive. It's alive!
  let dog = arr2.slice(0)
  for(var a = 0;a < arr1.length;a++){
     arr2.splice(n, 0,arr1[a]);
    n++;
    dog = arr2
  }
  return dog;
}

frankenSplice([1, 2, 3], [4, 5, 6], 1);

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_3) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.0.3 Safari/605.1.15.

Link to the challenge:
https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/basic-algorithm-scripting/slice-and-splice

The purpose of the challenge is to avoid changing the input arrays and to show you that you can use slice instead of splice to avoid mutating the array :slight_smile:

thank you sir.I very much appreciate you help