Labs

Small, hands-on labs on how JavaScript actually behaves under the hood. Each lab is one mental model, one tiny experiment, one prediction before you run it. Concepts are ordered so nothing is used before it's explained — see CLAUDE.md in the repo for the full prerequisite graph and page-format spec.

Every lab below is tagged with its primary landmark from Class 2's recurring-concerns map — the same small set of questions every programming language has to answer somehow.

Orientation

#ClassLandmarkStatus
Class 1Python vs JavaScript — First, Where Do They Fit?— orientation —Available
Class 2Every Language Has to Answer These Questions— orientation —Available
BonusA Managed Language vs. A Script-Born Language (C# vs JavaScript)— personal supplement —Available

The bonus class isn't part of the main numbered sequence — it's a standalone C#-background supplement, skippable if you're following the main Python-scaffolded path.

Foundation — Execution Model & Scope

#LabLandmarkStatus
03Values, Types & typeof◇Values & TypesAvailable
04undefined, null & Undeclared Identifiers◇Values & TypesAvailable
05Execution Context & the Call Stack▶ExecutionAvailable
06Creation Phase vs Execution Phase (Hoisting)▶ExecutionAvailable
07var, let, const & the Temporal Dead Zone◎Names & ScopeAvailable
08The Global Object & Global Execution Context▶ExecutionAvailable
09Lexical Environment & the Scope Chain◎Names & ScopeAvailable
10Single-Threaded, Synchronous Execution▶ExecutionAvailable

Functions as a First-Class Concept

#LabLandmarkStatus
11Functions Are ObjectsƒFunctionsNot written
12Function Declarations vs Function ExpressionsƒFunctionsNot written
13IIFEsƒFunctionsNot written
14ClosuresƒFunctions + ◎ScopeNot written
15Closures in Practice: Factories, Currying, MemoizationƒFunctionsNot written
16CallbacksƒFunctionsNot written
17Default, Rest & Destructured ParametersƒFunctionsNot written

The Object Model

#LabLandmarkStatus
18'this': Method Invocation & Losing 'this'▶Execution + ƒFunctionsNot written
19call, apply, and bindƒFunctionsNot written
20Arrow Functions & Lexical 'this'ƒFunctions + ◎ScopeNot written
21By Value vs By Reference◇Values & TypesNot written
22Object Creation, Property Lookup, Enumeration & Deletion▦Data & ObjectsNot written
23Object Shorthand, Computed Keys & Getters/Setters▦Data & ObjectsNot written
24Optional Chaining, Nullish Coalescing & Logical Assignment◇Values & TypesNot written
25Prototypes & the Prototype Chain▦Data, Objects & ReuseNot written
26Object.create & Pure Prototypal Inheritance▦Data, Objects & ReuseNot written
27Constructors and 'new'▦Data, Objects & ReuseNot written
28[[Prototype]] vs .prototype vs constructor▦Data, Objects & ReuseNot written
29ES6 Classes: constructor, Instances & Instance Methods▦Data, Objects & ReuseNot written
30Classes: extends, super, static & #private fields▦Data, Objects & ReuseNot written

Values & Comparison

#LabLandmarkStatus
31Coercion◇Values & TypesNot written
32Equality: == vs ===◇Values & TypesNot written
33Truthy, Falsy & Existence Checks◇Values & Types + ↪Control FlowNot written
34Numeric Precision & Special Values (NaN, -0, float error)◇Values & TypesNot written
35JSON: The Object/Text Boundary◇Values & Types + ▦Data & ObjectsNot written

Collections

#LabLandmarkStatus
36Arrays as Objects & length Behavior▦Data & ObjectsNot written
37Map & Set: Why Dedicated Collections Exist▦Data & ObjectsNot written
38WeakMap, WeakSet & Garbage Collection⌛Memory & LifetimeNot written
39Iterable/Iterator Protocol & for...of↪Control FlowNot written
40Generators: function* and yield↪Control Flow + ƒFunctionsNot written

Errors

#LabLandmarkStatus
41throw, try/catch/finally & Stack Unwinding!Errors & FailureNot written
42Custom Error Classes (extends Error)!Errors & Failure + ▦Data & ObjectsNot written

Asynchronous JavaScript

#LabLandmarkStatus
43The Event Loop: Stack, Host Environment & Task Queue⏱Async + ▶ExecutionNot written
44Microtasks vs Macrotasks⏱AsyncNot written
45Promises: States, .then/.catch/.finally, Chaining⏱Async + !ErrorsNot written
46async/await, Sequential vs Concurrent, Promise.all⏱AsyncNot written

Organization

#LabLandmarkStatus
47Modules: Module Scope, export/import, Dynamic import() & Top-Level await▣Modules + ◎ScopeNot written