Skip to content

Instantly share code, notes, and snippets.

@philsinatra
Created January 3, 2013 12:59
Show Gist options
  • Save philsinatra/4443277 to your computer and use it in GitHub Desktop.
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)
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