News for hackers. Stuff that matters.
Re:The many faces of undefined in JavaScript by eaglelizard on Wednesday June 26, 2024 @03:51AM (#40797401)
typeof null === 'object' // true

Brendan Eich has elaborated on why the decision was made, whether it was a good one or not - null is an empty object pointer.

Idiomatically, I'd argue that `null` shouldn't exist in Javascript, since undefined is the global "default empty" value.

There are no comments on this comment yet.