Display the sum of 1 + 5, using two variables x and y with the addition operator (+). - Javascript Operator

Javascript examples for Operator:Quiz

Description

Display the sum of 1 + 5, using two variables x and y with the addition operator (+).

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html>
<body>

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

<script>
var x = 1;//from   w  w w . jav  a2  s . co m
var y = 5;
document.getElementById("demo").innerHTML = x + y;
</script>

</body>
</html>

Related Tutorials