Javascript examples for Data Type:var
Create a third variable called z, assign x + y to it, and display it.
<!DOCTYPE html> <html> <body> <p id="demo"></p> <script> var x = 5;/*from w ww . j a va2 s . c om*/ var y = 10; var z = x + y; document.getElementById("demo").innerHTML = z; </script> </body> </html>