JavaScript undefined property
Definition and Usage
undefined property is used to store the JavaScript undefined value.
Browser Support
All major browsers support undefined property
Examples
Examples
Determine whether a variable is defined:
<script>
var t1="";
var t2;
if (t1===undefined)
{
alert("t1 is undefined");
}
if (t2===undefined)
{
alert("t2 is undefined");
}
</script>
var t1="";
var t2;
if (t1===undefined)
{
alert("t1 is undefined");
}
if (t2===undefined)
{
alert("t2 is undefined");
}
</script>
Examples of the above output:
t2 is undefined
try it"
JavaScript Global Functions