Skip to content

Instantly share code, notes, and snippets.

@bwills-gist
bwills-gist / console-log-conditional.js
Created March 14, 2012 16:09
Console.log conditional
// will ignore console.log statements in IE and Firefox w/o Firebug ---
var debugging = false; // or true
if (typeof console == "undefined") var console = { log: function() {} };
else if (!debugging || typeof console.log == "undefined") console.log = function() {};