Skip to content

Instantly share code, notes, and snippets.

@csharpforevermore
Created August 7, 2013 09:55
Show Gist options
  • Save csharpforevermore/6172727 to your computer and use it in GitHub Desktop.
Save csharpforevermore/6172727 to your computer and use it in GitHub Desktop.
Write text to the browser's console - if it has one - whilst ensuring we avoid generating an exception (i.e. in IE)
if (window.console && console.log) {
console.log('Hello world!');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment