var arr = [1,2,3,4,5];
arr2 = arr;
arr = arr2.concat([6,7,8,9,10]);
[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
arr2;
[1, 2, 3, 4, 5]
as in the code above, the array is a reference type object, and arr2 holds a reference to arr.
but why after operating on arr, the output arr2 is still the old value before arr.