Created
July 23, 2010 14:10
-
-
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
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
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