can someone explain to me why the variable old is still assigned to 1 instead of 8? I thought the variable old will change to 8 because I have assigned a new value to array [0]. I thought the equal sign holds the transitivity property.
array= [1,2,3,4,5];
var old=array[0];
array[0]=8;
console.log(old);//1
Thanks for your help