JavaScript undefined Property
Complete Function Reference
Definition and Usage
The undefined property indicates that a variable has not been assigned a value.Syntax
Example
In this example we will test two variables to find out if one of them is
undefined:
<script type="text/javascript">
var t1="";
var t2;
if (t1==undefined)
{
document.write("t1 is undefined");
}
if (t2==undefined)
{
document.write("t2 is undefined");
}
</script>
|
The output of the code above will be:
Try-It-Yourself Demos
undefined
How to test if a variable is undefined.
Complete Function Reference
 |

|
|
See why there are 20,000+ Ektron integrations worldwide.
Request an INSTANT DEMO or download a FREE TRIAL today. |
|
|
|