<html>
<body>
<h2>JavaScript Global Variables</h2>
<p>In HTML, global variables defined with <b>let</b>, will not become window variables.</p>
<p id="demo"></p>
<script>
let carName = "Volvo";
// code here can use window.carName
document.getElementById("demo").innerHTML = "I can not display " + window.carName;
</script>
</body>
<!-- Mirrored from www.w3schools.com/js/tryit.asp?filename=tryjs_let_global by HTTrack Website Copier/3.x [XR&CO'2014], Mon, 27 Jan 2020 02:39:34 GMT -->
</html>