Tuesday, November 11, 2014

A fun IE9 surprise


As much as I would like to avoid having to deal with IE8 and IE9, sometimes that is just a requirement of the job. Today, I ran across a fun JavaScript bug.

Can you spot it below?


In IE9, item is a function and since the loop left out the var keyword before item, there wasn't a local variable named item in the block.  The fix is simple, finding the bug, not so much.


Do yourself a favor and save a puppy, get a modern browser, and Browse Happy.

1 comment:

  1. Oh man, that is a fun bug. Good find! I think that on a normal day, I would have skipped right over that dang bug. Funny post, thanks.
    Mark Leach | http://www.altsrc.net

    ReplyDelete