Unusual scenario in JavaScript:
var array1 = new Array();
var array2 = new Array();
array1 = [[1,2],[3,4]];
for (i = 0; i < array1.length; i++) {
array2[i] = array1[i];
}
alert(array2[1][0]); // -> 3
array1[1][0] = 10;
alert(array2[1][0]); // -> 10
I am puzzled by the unexpected behavior