News for hackers. Stuff that matters.
Re:WTFJS? by invisible on Friday February 12, 2010 @09:43PM (#1122431)
If the programming can't handle a null object, check that the object is of the required type (by setting a key) or check that the object is not null. It's dumb to expect null to not be an object when EVERYTHING is an object in JS (except undefined, which is special). Furthermore, the programmer would be setting a value to null if they are checking for null (are there any other instances where null occurs without explicitly setting?).

There are no comments on this comment yet.