JS: null

By Xah Lee. Date: . Last updated: .

What is null

typeof null

typeof null return "object". (this is a historical bug. typeof null should return "null" )

console.assert(typeof null === "object");

Why typeof null return object

What is the Use of null

There are 2 major uses of null.

JavaScript null

JavaScript. Special Literals