Tell us what’s happening:
I tested it, and it returns the correct result, can someone explain why the test won’t show correct?
Thanks
Your code so far
function frankenSplice(arr1, arr2, n) {
let copied = arr1.slice(0, arr1[-1]);
arr2.splice(n, 0, copied);
return arr2;
}
console.log(frankenSplice([1, 2, 3], [4, 5], 1));
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36
.
Link to the challenge: