Reading about splice method. It returns
An array containing the removed elements. If only one element is removed, an array of one element is returned.
So by doing
arr2 = arr2.splice(2,0,"2");
you overwrite initial array arr
with empty array []
returned by splice.