“The input arrays should remain the same after the function runs.”
You’re changing the content of the second array using the splice method. While slice leaves the original array untouched, splice removes/adds certain elements from/to the array and modifies it.
In addition to that you are also adding an entire array at position n instead of adding the elements of the array starting at position n. If you want to use splice, you could try using apply on Array.prototype.splice. It takes this and an array as arguments. It also only works for arrays with a max size of around 65k.