Tell us what’s happening:
For some reason the website is not accepting my code, but when i console.log(arr3);
it seems that it is working fine. Is there something wrong with it that I am not seeing?
Your code so far
function frankenSplice(arr1, arr2, n) {
// It's alive. It's alive!
const arr3 = arr2.slice();
return arr3.splice(n, 0, arr1);
}
frankenSplice([1, 2], ['a', 'b'], 1);
Your browser information:
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.142 Safari/537.36
.
Link to the challenge:
https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/basic-algorithm-scripting/slice-and-splice/