News for hackers. Stuff that matters.
Re:Oddities about JavaScript by dexen on Monday May 30, 2011 @11:44AM (#2599658)
The ECMA standard supports your story. The `null' is the only instance of type `Null'. A Null instance does not have any properties; in particular, doesn't have the `constructor' property all actual object do.

What alert() does is an implicit conversion to string, and that is surprisingly defined to say "object" in ECMA standard. Could be matter of backward compatibility...

Re:Oddities about JavaScript by olavk on Monday May 30, 2011 @02:23PM (#2600052)
It actually makes some kind of sense in a dark, twisted way. If you think of it in terms of the Java type system, then the type of null is arguably Object.