Slice and Splice -

Tell us what’s happening:

please can someone go through this solution i don’t know what is wrong with the solution i did what i followed the instruction as instructed

Your code so far


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

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/68.0.3440.106 Safari/537.36.

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

function frankenSplice(arr1, arr2, n) {
// It’s alive. It’s alive!
let arr = arr2.slice();
for(var i in arr1){
arr.splice(n, 0, arr1[i]);
}
console.log(arr);
return arr
}

frankenSplice([1, 2, 3], [4, 5], 1);
frankenSplice([“claw”, “tentacle”], [“head”, “shoulders”, “knees”, “toes”], 2)
i tried another method with this still i cant pass the test despite checking through google chrome console and it gave the same reply as the answer should be

function frankenSplice(arr1, arr2, n) {
// It’s alive. It’s alive!
let arr = arr2.slice();
for(var i = arr1.length-1; i >= 0; i–){
arr.splice(n, 0, arr1[i]);
}
console.log(arr);
return arr
}

frankenSplice([1, 2, 3], [4, 5], 1);
frankenSplice([“claw”, “tentacle”], [“head”, “shoulders”, “knees”, “toes”], 2)
thanks i have fixed it with this. Thank you very much for your time.