I don't understand why my solution doesn't work

Tell us what’s happening:
Describe your issue in detail here.
Hi everyone, I don’t really understand why my solution doesn’t work for this problem, it looks like it should but it doesn’t. Can anyone please explain, thanks.

   **Your code so far**

function frankenSplice(arr1, arr2, n) {
return arr2.splice(n, 0, ...arr1);
console.log(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/94.0.4606.71 Safari/537.36

Challenge: Slice and Splice

Link to the challenge:

Check out the docs for splice. Hint, it does not return the array that has been spliced to.

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.