Slice and Splice help with spread operator

Tell us what’s happening:
When I console.log(x), my answers are the same as the answers given. Is there something about the data type that is incorrect?

Your code so far


function frankenSplice(arr1, arr2, n) {
  // It's alive. It's alive!
  let x =[];
  x = [...arr2]
  x.splice(n,0,[...arr1])
  console.log(x)
  return x
}

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

This line is “splicing” in a single array instead of multiple elements. You are actually returning the following

[ 4, [ 1, 2, 3 ], 5 ]
[ 'a', [ 1, 2 ], 'b' ]
[ 'head', 'shoulders', [ 'claw', 'tentacle' ], 'knees', 'toes' ]

when you should be returning:

[ 4, 1, 2, 3, 5 ]
[ 'a', 1, 2, 'b' ]
[ 'head', 'shoulders', 'claw', 'tentacle', 'knees', 'toes' ]