Slice and Splice -I think i code is right, but it does not work

Slice and Splice -I think i code is right, but it does not work
0

#1

Tell us what’s happening:

Your code so far


function frankenSplice(arr1, arr2, n) {
  // It's alive. It's alive!
  let newarr2 = arr2.slice();
  return newarr2.splice(n,0, ...arr1);

}

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

Your browser information:

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

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


#2

.splice() returns an array of the elements that have been removed out of the array, Since .splice(n, 0, ...), it doesn’t remove anything, but it still has to return an array, so it returns an empty one.

Maybe you intend to return newarr2 after splicing?