<html>
<body>
<h1>JavaScript Errors</h1>
<p>You cannot use the value of a non-existing variable:</p>
<p id="demo"></p>
<script>
let x = 5;
try {
x = y + 1;
}
catch(err) {
document.getElementById("demo").innerHTML = err.name;
}
</script>
</body>
</html>