Tell us what’s happening:
So I almost got the answer but one of the strings is missing ‘tentacle’.
Your code so far
function frankenSplice(arr1, arr2, n) {
var brandNewArr = [];
for(let i = 0; i < arr1.length; i++) {
var newArr = [];
arr2.splice(n+i, 0, arr1[i]);
newArr.push(arr2);
for(let j = 0; j < newArr.length; j++) {
return newArr[j];
}
brandNewArr.push(newArr[j]);
}
return brandNewArr;
}
frankenSplice(["claw", "tentacle"], ["head", "shoulders", "knees", "toes"], 2);
Your browser information:
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36
.
Link to the challenge:
https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/basic-algorithm-scripting/slice-and-splice