Skip to content

Instantly share code, notes, and snippets.

@bwills-gist
Created March 14, 2012 16:09
Show Gist options
  • Save bwills-gist/2037533 to your computer and use it in GitHub Desktop.
Save bwills-gist/2037533 to your computer and use it in GitHub Desktop.
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() {};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment