I was using console.log() in some JavaScript I wrote and an error of: console is not defined was thrown in Internet Explorer (worked fine in other
console.log()
console is not defined
How about this? Haven't tried it though
if (typeof console == "undefined" || typeof console.log == "undefined") var console = { log: function() {} };