Skip to content

Instantly share code, notes, and snippets.

@jwosty
Created December 19, 2019 18:52
Show Gist options
  • Save jwosty/b20d9576ebeeea22aa8b83bba17ae39d to your computer and use it in GitHub Desktop.
Save jwosty/b20d9576ebeeea22aa8b83bba17ae39d to your computer and use it in GitHub Desktop.
<html>
<head>
<title>Simple html page</title>
<script>if (typeof(xyz) === "undefined") { console.log("head: xyz doesn't exist") } else { console.log("head: xyz exists") }</script>
<script>console.log('head script executed')</script>
</head>
<body>
<h1>This is a &lt;h1&gt; element</h1>
<p>This is a &lt;p&gt; element</p>
<script>if (typeof(xyz) === "undefined") { console.log("body: xyz doesn't exist") } else { console.log("body: xyz exists") }</script>
<script>console.log('body script executed')</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment