It seems that this code is working well. Please try it out before you answer:
<!DOCTYPE html>
<html>
<body>
<h2>JavaScript Variables</h2>
<p>In this example, x, y, and z are variables.</p>
<p id="demo"></p>
<script>
let x = 7;
let y = 45;
let z = x + y;
demo.innerHTML = "The value of z is: " + z;//please note this line
</script>
</body>
</html>
Does this mean that I can replace document.getElementById("id"). with just id.???