Possible Duplicate:
Null object in javascript
Hi, I've read this thread about null in JavaScript, but I'm very confused about the identity of null
now.
As it is known that typeof(null)
evaluates to object
because of the language design error, and ECMA states that null is The Null Type
.
8.2 The Null Type
The Null type has exactly one value, called null.
So why people keep saying that null
is an object?
I've asked my senior engineer, and he said null is a singleton object. Is that how everybody sees the null as in JavaScript too?
Thanks