Browser Bugs & Inconsistencies
Inconsistent implementation of the for ... in loop.
Posted March 11th, 2009 by Adam
I ran into a hard-to-find bug today. After a while I figured out that IE cleared one of my hashes, for seemingly no good reason. This was my code:
for (var p in hash) { hash["x_" + p] = hash[p]; delete hash[p]; }
I actually didn’t manage to reproduce this behavior outside of my original script, instead IE would go into an infinite loop and rapidly claim all available memory when the code ran.