Hmm... You should update the test description as the original commenter requested then to clarify the data types. Either update the example code or the description.
I guess you're right. Could have swore there was a weird IE situation where it didn't operate on the actual array, but I can't find anything to confirm that.
So clone the arrays first in your solution.
Honestly, it wasn't specified, so I'd go by the YAGNI rule; simplest solution at first, refactor if necessary.
Hmm... You should update the test description as the original commenter requested then to clarify the data types. Either update the example code or the description.
That's interesting, I did not put that test case in there. I'll try to figure out who did.
The example clearly shows that all elements are integers, I think that is sufficient.
I guess you're right. Could have swore there was a weird IE situation where it didn't operate on the actual array, but I can't find anything to confirm that.
You're leaking globals (sorted1 and sorted2) here.
This actually should fail. Test it out for this case:
I'll update my test cases.