I have 2 for loops creating an object:
function newImage(){
image = {};
var temp = {}
for(i=0;i!=250;i++){
temp[i] = {};
}
image = temp;
for(i=0;i!=250;i++){
image[i] = temp;
}
}
This should create an object with 250 values, each being an object that contains 250 objects. However, it creates an object that creates 250 values, fills those with 250 values, and loops this for a while. I haven't found the end of the tree, but it doesn't freeze leading me to believe that it is finite. I've checked the iterations up to 50 and it works all the way (it doesn't make the long tree). It seems as if it is happening during the last iterations. Here's the full thing.