JavaScript Data Types — a practical guide to JavaScript data types with clear examples you can reuse in real projects.
JavaScript Tutorial Series (12/101). Prefer one article? Read the complete JavaScript tutorial.
Short description
Arrays and functions are objects; null is a historical typeof quirk (`object`).
typeof examples
typeof 'hi'; // string
typeof 42; // number
typeof true; // boolean
typeof undefined; // undefined
typeof null; // object (quirk)
typeof {}; // object