console.log in IE8

Why IE8 displays error for console.log line in JavaScript? Well, developer tools should be activated if you intend to use console.log command. Just press F12 (to turn on developer tools) and F5 (to reload the same page) – and error will disappear magically.

Once when developer tools (DOM inspector) has been activated error message:

 'console' is undefined
Code: 0
URI: http://www...

will no longer appear no matter if developer tool is opened or closed. I’m not sure why and if there is any logical explanation. Probably just another quirk from Microsoft.

Leave a Comment