Variables, Misc


null
Usage
  • Indicates the lack of a value.
  • Variables and properties that contain no value
  • Unspecified parameters
  • Functions that returned no value
  • A variable or property can be assigned a value of "null", to indicate that it no longer contains a value.
Examples
if (myStr != null) {
    myStr = null;
}

undefined
Usage
  • The default value for new variables and properties.
  • Indicates that a variable or property has not yet been assigned a value.
Examples
if (myStr == undefined) {
    myStr = "hello";
}

void
Usage
  • Indicates that a function does not return a value (specifically, the function returns a value of type Void).
Examples
function foo():Void {
    ...
}