Slice and Splice Not Working

Tell us what’s happening:

Why not passing the tests? LET ME PASS

Your code so far

function frankenSplice(arr1, arr2, n) {
newArr= arr2.slice();
    //need to add n+i as first arg because otherwise it keeps adding the elements @ the same position each run of the loop & we dont want them placed in reverse order in the newArr
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/68.0.3440.106 Safari/537.36.

Link to the challenge:

You are getting a warning that you need to declare newArr. Look through your entire code and make sure you are declaring each variable locally inside the function. You have 2 variables which need to be declared.

Also, your function needs to return a value. Currently, you are just displaying newArr to the console which is not the same as returning a value. Since you are not explicitly returning a value, JavaScript returns the value undefined for you.