Last active
November 15, 2017 15:44
-
-
Save ark234/58fdfaea85396a9919eaa110e082c4cc to your computer and use it in GitHub Desktop.
Task 3.2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Task 3.2</title> | |
</head> | |
<body> | |
<h1>JavaScript Variables</h1> | |
<p id="UID">In this task, x, y, and z are variables</p> | |
<script> | |
var x = 5; | |
var y = 7; | |
var z = x + y; | |
// Use backticks for string interpolation (template literals). | |
// ${expression} inside backticks will evaluate it to its value.// | |
document.getElementById('UID').innerHTML = `x + y = ${z}`; | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment