Basically you're just getting a reference to the original variable/array. Changing the reference will also change the original array. You need to loop over the values of the original array and form a copy.
Consider this example:
var orig = { a: 'A', b: 'B', c: 'C' };
Let's say you want to create a duplicate of this, so that even if you change the original values, you can always return to the original.
I can do this:
var dup = orig; //Shallow copy!
If we change a value:
dup.a = 'Apple';
This statement will also change a from orig, since we have a shallow copy, or a reference to var orig. This means, you're losing the original data as well.
But, creating a brand new variable by using the properties from the original orig variable, you can create a deep copy.
var dup = { a: orig.a, b: orig.b, c: orig.c }; //Deep copy!
Now if you change dup.a, it will only affect dup and not orig.