Help me to understand. Why when changing the value of the i-th element of array 2, the value of the i-th element of array 1 also changes, following the pattern of which array 2 was created. I cannot enter.
var array1 = [1, 2, 3]; var array2 = array1; array2[0] = 100; alert(array2) // [100, 2, 3] alert(array1) // [100, 2, 3] ????why????