contents   index   previous   next



undefined

If a variable is created or accessed with nothing assigned to it, it is of type undefined. An undefined variable merely occupies space until a value is assigned to it. When a variable is assigned a value, it is assigned a type according to the value assigned. Though variables may be of type undefined, there is no literal representation for undefined. Consider the following invalid fragment.

 

var test;

if (test == undefined)

   Screen.writeln("test is undefined")

 

After var test is declared, it is undefined since no value has been assigned to it. But, the test, test == undefined, is invalid because there is no way to literally represent undefined.

 


null