<!DOCTYPE html>
<html>
<body>
<h1>JavaScript Statements</h1>
<p>Statements are separated by semicolons.</p>
<p>The variables x, y, and z are assigned the values 5, 6, and 11:</p>
<p id="Sample"></p>
<script>
var x = 5;
var y = 6;
var z = x + y;
document.getElementById("Sample").innerHTML = z;
</script>
</body>
</html>
The variables x, y, and z are assigned the values 5, 6, and 11:
<html>
<body>
<h1>JavaScript Statements</h1>
<p>Statements are separated by semicolons.</p>
<p>The variables x, y, and z are assigned the values 5, 6, and 11:</p>
<p id="Sample"></p>
<script>
var x = 5;
var y = 6;
var z = x + y;
document.getElementById("Sample").innerHTML = z;
</script>
</body>
</html>
--------------
OUTPUT:-
JavaScript Statements
Statements are separated by semicolons.The variables x, y, and z are assigned the values 5, 6, and 11:
11
-------------------------------
No comments:
Post a Comment