Skip to content

Instantly share code, notes, and snippets.

@dmpayton
Created May 14, 2011 00:59
Show Gist options
  • Save dmpayton/971560 to your computer and use it in GitHub Desktop.
Save dmpayton/971560 to your computer and use it in GitHub Desktop.
console.log
<!DOCTYPE html>
<html>
<head>
<title>console test.</title>
<script type="text/javascript">
// Fake out console.log so that certain browsers don't trip out.
function fauxConsole() { return {log: function(){ return }} }
var console = console || fauxConsole();
// Now you can use console.log without throwing errors.
console.log('hello, world');
</script>
</head>
<body>
<p>console test.</p>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment