Tell us what’s happening:
My code is returning the right answer but its not passing. please help
Your code so far
function frankenSplice(arr1, arr2, n) {
// It's alive. It's alive!
var sliced= arr2.slice();
sliced.splice(n,0,arr1);
return sliced;
}
var result= frankenSplice([1, 2, 3], [4, 5], 1);
console.log(result);
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 6.2; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.131 Safari/537.36
.
Link to the challenge:
https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/basic-algorithm-scripting/slice-and-splice