primitives
7 primitives: string, number, bigint, boolean, undefined, null, symbol
Everything else is an object (arrays, functions, dates, etc.)
Primitives are immutable and compared by value. Objects are compared by reference.
typeof null === "object" — historic bug in JS. Null is not an object.
typeof function(){} === "function" — functions are objects but typeof returns "function".
typeof undefined === "undefined"
NaN is type number. NaN !== NaN — the only value not equal to itself. Check with Number.isNaN(), not isNaN() (which coerces first).