Hi there… I’m having some defining problems. I have also been looking at fastest shorthand for object and array creation.
Unfortunately my example doesnt work, but all I want is to loop through and set an object each time into an array, then when the loop is complete, add this array of objects to the master array … to the code boys:
var master = [];
var nest = []; // for the loop
for(var i=0;i<5;i++){
var obj ={ index:i }; // create object
nest* = obj;
if(i==4) master[0] = nest;
}
trace(master[0][3].index); // answer should be 4
can you help me out? … I intend to make this more complex which is why I need the master and nest arrays.