Understanding Null in JavaScript: A Primitive or an Object?
Aug 6, 2024 · 2 min read · JavaScript is full of quirks, and one of the most puzzling is the treatment of null. While the official ECMAScript specification defines null as a primitive value, using the typeof operator reveals a surprising result: it returns "object". This appar...
Join discussion