What data types are there in JavaScript?
Seven primitives — string, number, boolean, null, undefined, symbol, bigint — and everything else is an object, including arrays and functions. Primitives are copied by value and objects by reference, which is the source of most confusion about why changing one variable changed another. typeof null returns 'object', and that is a bug from 1995 that can never be fixed without breaking the web.