Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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