Laurent Bugnion, GalaSoft wrote:
Quote:
null is the value that an object has when it hasn't been initialized, |
No, that is `undefined', the primitive sole value of the Undefined type.
Try
var a;
alert(typeof a);
`null' is a special object literal, the primitive sole value of the
Null type. It "represents the null, empty, or non-existent reference."
Try
alert(typeof null);
See
<http://devedge.netscape.com/library/manuals/2000/javascript/1.5/guide/ident.html#1008306>
<http://www.ecma-international.org/publications/standards/Ecma-262.htm>
ECMAScript Edition 3 (on which JavaScript 1.5 is based upon), sections
4.3.9 to 4.3.12
Quote:
in other word when no memory has been allocated for it yet. |
There is *always* memory allocated for a variable/object/property,
otherwise it would not be accessible (at least memory for an entry
in the global hash table must be allocated). AFAIK this is
independent of the programming language used.
PointedEars