Created
April 14, 2012 14:15
-
-
Save bjankord/2384682 to your computer and use it in GitHub Desktop.
Simple cross-browser debug function
This file contains hidden or 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 debug(text) { | |
((window.console && console.log) || (window.opera && opera.postError) || window.alert).call(this, text); | |
} | |
var test = "This is a test"; | |
debug(test); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment