Slice and Splice, plz help

Slice and Splice, plz help
0

#1

Tell us what’s happening:

I am getting all my outputs but ,it is still showing, me errors.

Your code so far


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

console.log(frankenSplice([1, 2], ["a", "b"], 1));

Your browser information:

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

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


#2

You are not returning the correct results.


#3

hmm, now i understood, thnxx, in console it was not showing me arr1 in the form of array.