Slice and Splice Help Please!

Tell us what’s happening:
The answer is the same, but it’s actually not passing the site tests – could anyone tell me why?

Your code so far


function frankenSplice(arr1, arr2, n) {
  // It's alive. It's alive!
  let arrNew = [...arr2];

  arrNew.splice(n,0, arr1);

  console.log(arrNew);
  
  return arrNew;
}

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

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.75 Safari/537.36.

Link to the challenge:

You are creating a multi-dimensional array, but the challenge requires a flat array.
Here, you can see what your results look like before they are formatted for the FCC results window.

1 Like

Ahhh, I see. That makes a lot of sense. Thanks so much!