darkgaro
04-09-2006, 03:57 PM
Are objects stored as references or are they caopied when they are assigned to the varaibles.
lets say I have this code
var myArray = new Array();
for (i=1; i<=10; i++)
{
myArray[i] = new LzView(canvas, {});
}
var firstElement = myArray[1];
When I assign the myArray[1] to a new variable 'firstElement' is the LzView object referenced or copied ?
And if it is not asgined as reference , can you do it and how ?
Thanks
lets say I have this code
var myArray = new Array();
for (i=1; i<=10; i++)
{
myArray[i] = new LzView(canvas, {});
}
var firstElement = myArray[1];
When I assign the myArray[1] to a new variable 'firstElement' is the LzView object referenced or copied ?
And if it is not asgined as reference , can you do it and how ?
Thanks