JavaScript has 7 primitives + Object.
- primitives: string, number, bigint, boolean, undefined, null, symbol
- everything else is an object (arrays, functions, dates...)
typeof valuereturns the type as a string- primitives are immutable and copied by value; objects are by reference
See examples/.
Write describe(value) returning a friendly type name.