Created
January 3, 2013 12:59
-
-
Save philsinatra/4443277 to your computer and use it in GitHub Desktop.
Javascript function checking for console support. Helpful when there needs to be support for browsers that don't support the console (<=IE8)
This file contains 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
function consoleLog(msg) { | |
if (typeof console !== ‘undefined’) { | |
console.log(msg); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment