HOME HTML CSS JAVASCRIPT SQL PHP JQUERY XML ASP.NET MORE...
REFERENCES | EXAMPLES | FORUM | ABOUT

JavaScript undefined Property

Function Reference JavaScript Global Functions

Example

Test if a variable is undefined:

var x;

if (x===undefined)
  {
  txt="x is undefined";
  }
else
  {
  txt="x is is defined";
  }

The result of txt will be:

x is undefined

Try it yourself »

Definition and Usage

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


Browser Support

Internet Explorer Firefox Opera Google Chrome Safari

The undefined property is supported in all major browsers.


Technical Details

JavaScript Version: 1.3


Function Reference JavaScript Global Functions

Your suggestion:

Close [X]

Thank You For Helping Us!

Your message has been sent to W3Schools.

Close [X]
Search w3schools.com:

WEB BUILDING

Download XML Editor FREE Website BUILDER Free HTML5 Templates

SHARE THIS PAGE