Skip to content

Instantly share code, notes, and snippets.

@ethagnawl
Created April 30, 2013 00:23
Show Gist options
  • Save ethagnawl/5485839 to your computer and use it in GitHub Desktop.
Save ethagnawl/5485839 to your computer and use it in GitHub Desktop.
Cross-browser log utility function
window.log = (function () {
if (window.console && window.console.log) {
return function (message) {
console.log(message);
}
} else {
return function (message) {
alert(message);
}
}
}());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment