I cannot begin to count the number of hours I have wasted trying to figure out what the hell Internet Explorer is doing. This latest one really threw me for a loop, so I thought I would share what I learned so someone else doesn’t waste the time that I did.
Internet Explorer does not support console.log but you will never know that once you open the Developer Tools!
I admit… its partially my fault. But here is why I hate IE – once you open the Developer Tools, console.log is available from that point forward. An end user that has no idea what the Developer Tools are will see code that crashes due to an “Unsupported Object or Property”, essentially a Null Pointer Exception. But as a developer who has used the Developer Tools, everything works fine and dandy. Ugh.
So take heed. Don’t be lazy and leave unchecked console.log messages in your code. If you do, it could cause trouble for your users without you even realizing it.