Tell us what’s happening:
The description of this challenge is not fully clear.
Because as I see that the output in one case is taking the first element only and then adding the rest oft the array at the end of arr2 (see example one)
while in example 2 it takes the entire array and addes it to the arr2 in the specified index(this is what we understand while the 1st example seems to be falsy test)
Am I missing something here ?
**Your code so far**
function frankenSplice(arr1, arr2, n) {
let arr1S=arr1.slice();
let arr2S=arr2.slice();
return arr2S.splice(n,0,...arr1S);
}
frankenSplice([1, 2, 3], [4, 5, 6], 1);
**Your browser information:**
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36
Challenge: Basic Algorithm Scripting - Slice and Splice