Course contentsShow
← JavaScript
Lesson 31 of 2,7232. Values and TypesFree lesson

The Seven Primitive Types

Learn the complete list of JavaScript's seven primitive types and what makes a value primitive.

The Seven Primitive Types

What you'll learn: The complete list of JavaScript's seven primitive types and what makes a value "primitive."

What Are Primitive Types?

In JavaScript, values are categorized into two main groups: primitives and objects. Primitives are the simplest, most basic forms of data—they're single, indivisible values that can't be broken down further. Think of them like atoms in chemistry: they're the fundamental building blocks.

The Seven Primitives

JavaScript has exactly seven primitive types:

  1. Number — any numeric value (integers and decimals)
  2. String — text wrapped in quotes
  3. Boolean — true or false
  4. Undefined — represents "no value assigned yet"
  5. Null — represents "intentionally empty"
  6. Symbol — unique identifiers (advanced use)
  7. BigInt — very large integers beyond Number's limit

What Makes a Value Primitive?

Primitives have two key characteristics:

  • Immutable: Once created, a primitive value cannot be changed. You can create new values, but you can't modify the original.
  • Stored by value: When you work with a primitive, you're working with the actual value, not a reference to it.

This is different from objects (like arrays and functions), which are stored by reference and can be modified after creation.

Why This Matters

Understanding primitives helps you predict how JavaScript handles your data. Each primitive type serves a specific purpose and behaves in predictable ways. In upcoming lessons, we'll explore each type in detail.

Key Takeaway: JavaScript has seven primitive types—Number, String, Boolean, Undefined, Null, Symbol, and BigInt—which are immutable, indivisible values that form the foundation of all JavaScript data.