Skip to content

Instantly share code, notes, and snippets.

@halfnibble
Created June 27, 2019 00:32
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 halfnibble/3fbc84a14910d8f757f5494c64b0ee8c to your computer and use it in GitHub Desktop.
Save halfnibble/3fbc84a14910d8f757f5494c64b0ee8c to your computer and use it in GitHub Desktop.
Example code so far.
<!DOCTYPE html>
<html>
<head>
<title>My JavaScript Test</title>
</head>
<body>
<h1 id="page-header">
Loading...
</h1>
<script type="text/javascript">
var myName = "Joshua"
var header = document.getElementById("page-header")
// concatenation
header.innerHTML = myName + " is cool."
// interpolation
var numberString = "75";
var numberNumber = 75;
var booleanValue = false;
booleanValue = 'false';
let someValue = 3;
header.innerHTML = `Hello, ${typeof booleanValue}!`
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment