hello all,
actually, i have been finished the task with the looping method, but there is something that makes me confuse…
before i using the looping method, i’ve been trying to use the conventional ways
here’s the code
function frankenSplice(arr1, arr2, n) {
// It's alive. It's alive!
let a = arr1.slice(0, arr1.length);
let b = arr2.slice(0, arr2.length);
b.splice(n, 0, a)
return b
}
frankenSplice([1, 2], ["a", "b"], 1);
when i console.log the function, i getting the right result, but why i still get wrong??