Primitive Types
JS · Data Typessyntax
string | number | boolean | undefined | null | symbol | bigintexample
const name = "Mira"; // string
const age = 28; // number
const active = true; // boolean
const missing = undefined; // undefined
const empty = null; // null
const id = Symbol("id"); // symbol
const big = 900719925474099267n; // bigintNote Primitives are immutable and compared by value. There are 7 primitive types in total.