Slice and Splice/My results are correct but fCC doesn't agree

Hi,

I’ve tested the following code, & it produces the correct results. However, the freeCodeCamp program tells me I’m not delivering the correct results. Is this because I’m not supposed to use an array as the 3rd argument in splice?

Thank you for your time,

Michael

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

frankenSplice([1, 2, 3], [4, 5, 6], 1);
frankenSplice([1, 2, 3], [4, 5], 1);
frankenSplice([1, 2], [“a”, “b”], 1)
frankenSplice([“claw”, “tentacle”], [“head”, “shoulders”, “knees”, “toes”], 2)


**Your browser information:**

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

**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 when you need to return a flat array.

See below:

Can we now execute code in editor now?

I don’t understand your question.

I was talking about your demo I though Fcc’s editor has a module to execute code now I didn’t see that it was on reply.it