Javascript examples for Data Type:var
Display the sum of 5 + 10, using two variables x and y.
<!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>