Edit This Code:
<!DOCTYPE html>
<html>
<body>

<h1>JavaScript Variables</h1>

<p>A variable declared without a value will have the value undefined.</p>

<p id="demo"></p>

<script>
var carName;
document.getElementById("demo").innerHTML = carName;
</script>

</body>
</html>




Result:
Try it Yourself - © w3schools.com
Privacy Policy