JavaScript: Mental Models & Labs

Learn what JavaScript is actually doing, one experiment at a time.

How the Labs Work

Each lab follows the same shape, in order:

  1. One mental model
  2. What the engine is doing internally
  3. A tiny experiment
  4. Predict before running (when relevant)
  5. Run it
  6. Explain the result — what you wrote vs what the engine effectively does
  7. Change one thing
  8. Predict again
  9. Connect it back to the mental model
  10. A tiny comprehension check

Get Started

What This Is Not

Not a syntax reference, not an app-building tutorial, not gated behind quizzes to advance. Experiments stay intentionally small — the goal is understanding why JavaScript behaves the way it does, not shipping a project. Skip around if a later lab pulls you in; just make sure any prerequisite concepts it names are ones you've already done.

Static HTML, no build step.