Javascript examples for Data Type:var
Create a variable called carName, assign the value "HTML" to it, and display it.
<!DOCTYPE html> <html> <body> <p id="demo"></p> <script> var carName = "HTML"; document.getElementById("demo").innerHTML = carName; </script>/*www.j a v a2 s.c om*/ </body> </html>