Are there other reasons? What if they are too long? Will that make the browser crash, if so how long is too long?
Could a long looping crashing problem be solved with a setTimout
0 loop so code is executed every next tick and if this is the case, would it also be possible to loop infinitely in this manner and never crash?
I am not coding something this stupid sounding, I have just always wondered.
I would have thought it is different on each browser, so for the sake of the question lets say it is a reasonably well known and used browser - Chrome.
EDIT: The garbage collector and objects not being destroyed has been mentioned, does someone have an example of this?