Slice and Splice, should this be a valid answer?

Tell us what’s happening:
As far as I can tell, this is a valid solution to the problem. I looked at the requirements and the only thing that might be missing is - “All elements from the first array should be added to the second array in their original order” Is that the issue here?

Your code so far


function frankenSplice(arr1, arr2, n) {
  let newArr = arr2.slice(0);
     newArr.splice(n, 0, arr1)
  return newArr;
}

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

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.98 Safari/537.36.

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

The problem is:

newArr.splice(n, 0, arr1);

The line above attempts to insert arr1 into the nth index of newArr, instead of inserting the elements of arr1 into the nth index of newArr. Any argument passed into the splice method after the 2nd argument will be inserted into the array. arr1 is treated as a single argument because it is a single item (an array).

So it passes the entire array and not the elements in the array. Ok. I think I get it.