Don’t Use JS’s for(i in object) in Internet Explorer

Just don’t do it. Use for(i=0;i<object.length;i++), please!

I spent about 30 minutes trying to figure out why IE wouldn’t recognize instanceof HTMLElement or nodeType, only to realize that my for(i in object) loop was just spitting out garbage.

ARGH! I HATE YOU INTERNET EXPLORERRRRRR!

Leave a Reply

  • I promise I'll be nice to your email address