Create a variable called carName, assign the value "HTML" to it, and display it. - Javascript Data Type

Javascript examples for Data Type:var

Description

Create a variable called carName, assign the value "HTML" to it, and display it.

Demo Code

ResultView the demo in separate window

<!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>

Related Tutorials