Created
March 14, 2012 16:09
-
-
Save bwills-gist/2037533 to your computer and use it in GitHub Desktop.
Console.log conditional
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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