Display the sum of 5 + 10, using two variables x and y. - Javascript Data Type

Javascript examples for Data Type:var

Description

Display the sum of 5 + 10, using two variables x and y.

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html>
<body>

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

<script>
var x = 5;// ww w  .  j  ava 2  s.c  o m
var y = 10;
document.getElementById("demo").innerHTML = x + y;
</script>

</body>
</html>

Related Tutorials