Tell us what’s happening:
Why my code is incorrect??
It returning exactly what we need.
Your code so far
function frankenSplice(arr1, arr2, n) {
// It's alive. It's alive!
let localArray = [...arr2];
localArray.splice(n, 0, [...arr1]);
return localArray;
}
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/71.0.3578.98 Safari/537.36
.