Skip to content

Instantly share code, notes, and snippets.

@jimfleming
Created July 23, 2010 14:10
Show Gist options
  • Save jimfleming/487479 to your computer and use it in GitHub Desktop.
Save jimfleming/487479 to your computer and use it in GitHub Desktop.
Since IE is dumb and doesn't support console.log this will check if console.log already exists, if not it will create a function that alerts
if (typeof console == 'undefined' && typeof console.log == 'undefined') console = { log : function(message) { alert(message) } }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment