I just created two arrays and assigned a inserted a key value pair to one of the array. Then i assigned or copy an array to other. After that i added another key value pair to second array, but it reflects to the original array also. For example.
var array1 =[];
var array2 =[];
array1.value1 ='1';
array2 = array1;
array2.value2 ='2';
console.log(array1); // it prints {value1:1, value2:2}
why its changing the array1 object while i added a key value pair for array2?