I'm just starting JavaScript and I can't declare a variable. Possible that it is being declared but when I use the variables in a math equation there is no output from that equation.
For example:
let x = 5; <br>
let y = 6; <br>
let z = x + y; <br>
document.getElementById("demoVariables").innerHTML = "The value of z is " + z;
<br>
//demoVariables is a paragraph block level element which is supposed to change to "The value of z is " and the value of z after that but for now is not being used or altered and I don't know why.
<h1>JavaScript Variables</h1>
<p>In this example, x, y, and z are variables.</p>
<p id="demoVariables"></p>
<br>
<br>
I load this .html file into the web browser and the only thing that is output to the web browser is this:
<h1>JavaScript Variables</h1>
<p>In this example, x, y, and z are variables.</p>
<br>s in your script?<br>in<script>blocks. Aren't you getting syntax errors?