Categories
JavaScript

Avoid console.log error messages in IE

Use the following piece of code:

if (typeof console == “undefined” || typeof console.log == “undefined”) var console = { log: function() {} };

Leave a Reply

Your email address will not be published. Required fields are marked *