Launch offer
Business website $150 USD Custom plugin $200 USD Ready in 5 days
Get a quote
JavaScript

JavaScript Data Types

Know typeof results for string, number, boolean, null, undefined, symbol, bigint, and object.

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

Leave a reply

Your email address will not be published. Required fields are marked *