JS
07
JavaScript Foundations

JavaScript Foundations

The bedrock JavaScript every later concept rests on — values, variables, equality, control flow, and errors.

~ 140 min·8 lessons·updated apr 2026

What you'll learn


Lessons

Read in order. Each lesson stands on its own, but the order is deliberate.

8 lessons · ~140 min total

  1. 01
    What JavaScript actually is
    Engines, runtimes, and the spec your code conforms to.
    13 min
  2. 02
    Values and types
    The seven primitives, the object kingdom, and what typeof tells you.
    18 min
  3. 03
    Variables
    let, const, and var — block scope, function scope, and the temporal dead zone.
    18 min
  4. 04
    Operators and expressions
    Arithmetic, logic, short-circuits, and the ternary you actually want.
    18 min
  5. 05
    Equality and coercion
    Why == surprises people, the truthy table, and the rule that ends the pain.
    20 min
  6. 06
    Control flow
    if, switch, the loop family, and the gotcha that bites every newcomer.
    18 min
  7. 07
    Strings and numbers, briefly
    Template literals, common methods, and why 0.1 + 0.2 isn't 0.3.
    19 min
  8. 08
    Errors
    throw, try/catch/finally, built-in error types, and when to let it fly.
    16 min

Prerequisites

  • · Read code in any C-family language
  • · Comfortable typing in a terminal
  • · No HTML or DOM needed

After this, try