Get your own website Result Size: 625 x 565
x
 
<!DOCTYPE html>
<html>
<body>
<h1>JavaScript Global Properties</h1>
<h2>The undefined Property</h2>
<p id="demo"></p>
<script>
if (typeof y === "undefined") {
  text = "y is undefined";
} else { 
  text = "y is defined";
}
document.getElementById("demo").innerHTML = text;
</script>
</body>
</html>