Javascript examples for Operator:Arithmetic Operator
add two number values together
<!DOCTYPE html> <html> <body> <button onclick="myFunction()">Test</button> <p id="demo"></p> <script> function myFunction() {/*from w w w . j av a2 s . c o m*/ var y = 5; var x = y + 2; document.getElementById("demo").innerHTML = x; } </script> </body> </html>