<html>
<body>
<h2>JavaScript</h2>
<p>To test if an object does not exist, test if the type is undefined:</p>
<p id="demo"></p>
<script>
document.getElementById("demo").innerHTML = typeof myObj === "undefined";
</script>
</body>
<!-- Mirrored from www.w3schools.com/js/tryit.asp?filename=tryjs_mistakes_object_undefined by HTTrack Website Copier/3.x [XR&CO'2014], Wed, 05 Jun 2019 13:23:14 GMT -->
</html>