Skip to content

Instantly share code, notes, and snippets.

@ErinCall
Created January 23, 2015 23:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ErinCall/5c83fb58727f445ef747 to your computer and use it in GitHub Desktop.
Save ErinCall/5c83fb58727f445ef747 to your computer and use it in GitHub Desktop.
Surprising JS error
<!DOCTYPE html>
<html>
<head>
<title>Surprising JS error</title>
</head>
<body>
<script type ="text/javascript">
var name = document.createElement("h1");
name.textContent = "nimzowitch";
if (typeof console !== 'undefined') {
console.log(name);
}
document.body.appendChild(name);
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment