Edit This Code:
<!DOCTYPE html>
<html>
<body>

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

<script>
var x = 5;  // Initialize x

elem = document.getElementById("demo");            // Find an element
elem.innerHTML = "x is " + x + " and y is " + y;    // Display x and y

var y = 7;  // Initialize y
</script>

</body>
</html>


Result:
Try it Yourself - © w3schools.com
Privacy Policy