Slice and Splice challenge error

Its giving the right solution in the console but still I am not able to clear the challenge

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

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

Your browser information:

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

Not quiet. Here is what you get.

=> [ 4, [ 1, 2, 3 ], 5, 6 ]

You still need to extract out the numbers from the first array.

Hi,
Can you share the task you are asked to do?

Yeah, this thing wan’t obvious in the fcc console but saw it chrome console. Changed my program and cleared the challenge.
Thanks

1 Like

Basic Algorithm Scripting: Slice and Splice ,in Basic Algorithm Scripting inside Javascript Algorithms And Data Structures Certification. I am new to this forum so cant post a link.

1 Like