how not to let console.log() to cause error on IE or other browsers - SitePoint Forums

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

This is a fix for Firebug's console.log statements causing js execution problems in other browser. The above code has to be pasted at the top of javascript statements on your page or before the usage of the first console.log statement

Loading mentions Retweet
Posted 6 months ago

0 Comments