From http://www.w3schools.com (Copyright Refsnes Data)

JavaScript undefined Constant


Function Reference JavaScript Functions

Definition and Usage

The undefined property indicates that a variable has not been assigned a value.


Example

Example

Test if variables are 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:

t2 is undefined

Try it yourself »


Function Reference JavaScript Functions

From http://www.w3schools.com (Copyright Refsnes Data)