MODULE 02 · BEGINNER

Values, Types, Coercion & Equality MechanicsJavaScript Mastery · Module 2

Master ECMAScript data representations: the 7 primitives, reference pointers, abstract coercion rules, and equality algorithms.

4 lessons16 min readingV8 Engine, Types & Scoping Foundations1 project
Free, self-paced, and open to everyone. No account needed.
WHAT THIS MODULE COVERS

Values, Types, Coercion & Equality Mechanics

Master ECMAScript data representations: the 7 primitives, reference pointers, abstract coercion rules, and equality algorithms.

BEFORE YOU START

Understanding of variables and execution environments from Module 1.

WHAT YOU’LL BE ABLE TO DO

Master the 7 primitives, reference identity, ECMAScript abstract coercion operations, and equality algorithms.

THE LESSON SEQUENCE

Read in order, or jump to what you need.

Every lesson builds on the one before it. Open any lesson to read the explanation, run the examples, and try the practice challenges.

  1. 02.01
    The 7 Primitive Types vs Object Reference Semantics

    Examine ECMAScript data types. Understand value immutability, memory representations, wrapper boxing, and reference identity.

    4 min
  2. 02.02
    Type Coercion Mechanics: ToPrimitive, ToNumber, and ToString

    Master JavaScript's abstract coercion operations. Learn how the language converts values during arithmetic, comparison, and string interpolation.

    4 min
  3. 02.03
    Equality Demystified: Strict (===), Loose (==), and Object.is()

    Master equality comparisons. Understand the loose equality coercion algorithm, strict type checking, and the precise mathematical distinctions of Object.is().

    4 min
  4. 02.04
    PROJECT 01: Type-Safe Schema ValidatorProject

    Build a zero-dependency type validation library from scratch. Validate nested object shapes, enforce strict primitives, and emit rich error diagnostics.

    4 min
MODULE SELF-CHECK

Ready to move on?

Complete the Type-Safe Schema Validator project validating arbitrary input objects.

Open the module self-check