Slice and Splice seems to be returning correct array but isn't

Tell us what’s happening:
The console log seems to tell me I’m getting the correct result:
4,1,2,3,5,6
head,shoulders,claw,tentacle,knees,toes

But my code isn’t being accepted to complete the challenge.

I think I’m missing something very simple.

Your code so far


function frankenSplice(arr1, arr2, n) {
  // It's alive. It's alive!
  let arr1Length = arr1.length;
  let arr1Copy = arr1.slice(0, arr1Length);

  let arr2Length = arr2.length;
  let arr2Copy = arr2.slice(0, arr2Length);

  arr2Copy.splice(n, 0, arr1Copy);
  console.log(arr2Copy);
  return arr2Copy;
}

frankenSplice([1, 2, 3], [4, 5, 6], 1);
frankenSplice(["claw", "tentacle"], ["head", "shoulders", "knees", "toes"], 2)

Your browser information:

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

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

You are returning a multi-dimensional array (see below). You need to return a flat array.

Oh that makes sense. Ok thanks!