HTML CSS Javascript jQuery AJAX PHP Java MORE

JavaScript Variables

<!DOCTYPE html>
<html>
<body>

<h2>JavaScript Variables</h2>

<p>In this example, a, b, c, and d are variables.</p>

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

<script>
var a = 5;
var b = 6;
var c = 3
var d = a + b - c;
document.getElementById("demo").innerHTML =
"The value of d is: " + d;
</script>

</body>
</html>

Run it yourself