Programming Code Center(PCC)
[JS]

(PCC)::[How-JavaScript-variables-work]::[js]

File Name : index.html

<!DOCTYPE html>
<html>
<body>

<h2>JavaScript Variables</h2>

<p>In this example, x, y, and z are variables.</p>

<p id="demo"></p>

<script>
var x = 5;
var y = 6;
var z = x + y;
document.getElementById("demo").innerHTML =
"The value of z is: " + z;
</script>

</body>
</html>


Output :

JavaScript Variables

In this example, x, y, and z are variables.