Please help me here I don’t know what is wrong in my code
function frankenSplice(arr1, arr2, n) {
let combinedArr = [];
for(let i = 0; i < n; i++){
combinedArr.push(arr2[i]);
}
combinedArr.push(arr1);
combinedArr.push(arr2.slice(n));
for (let i = 0; i < combinedArr.length; i++) {
console.log("combinedArr["+i+"] is " + combinedArr[i]);
}
return combinedArr;
}
frankenSplice([1, 2, 3], [4, 5, 6], 1);
here is the console output
"combinedArr[0] is 4"
"combinedArr[1] is 1,2,3"
"combinedArr[2] is 5,6"