I'm hoping for some clarification on this topic.
Let's imagine I have 2 global variables: var myarray=[1,3,5,7,9],hold;
and then I execute the following code:
function setup()
{
alert (myarray[0]);//displays 1
hold=myarray;
alert (hold);//seems to display 'hold' containing all the values of myarray. first number shown is 1
myarray[0]=2;
alert (hold);//shows the values of myarray with the updated first entry. first number shown is 2
}
Is it correct to assume that 'hold' is simply holding a reference to myarray, instead of actually storing all the values within itself?