Lessons
What JavaScript is and how it runs
Understand what JavaScript is, where it runs (browser and Node.js), and how the script tag works.
Prerequisite: None — start here.
What to look for:
- The Curious tab — read only this level first
- The critical notes panel — all 7 points
- How JavaScript differs from Python in one sentence
- What "interpreted at runtime" means
Variables, types, and type coercion
const/let/var, the 8 types, and why == is dangerous. The most important 40 minutes in JavaScript.
Prerequisite: Lesson 1
What to look for:
- The type table — memorise the typeof column
- The coercion examples — run each one in your browser console
- The falsy values table — all 8, especially [] and {} being truthy
- The == vs === section — use === always
Control flow and loops
if/else, switch, for, for...of, for...in, while, break/continue, ternary operator.
Prerequisite: Lesson 2
What to look for:
- The JavaScript tab on the concepts page
- for...of (iterates values) vs for...in (iterates keys)
- The ternary expression for concise conditions
- Optional chaining ?. — how it prevents "cannot read property of undefined"
Functions and scope
Function declarations, expressions, arrow functions, default parameters, closures, and the LEGB scope model.
Prerequisite: Lessons 1–3
What to look for:
- The three function syntaxes and when each is hoisted
- Closures — the counter example and why it works
- The this section in Curious — just understand that arrow functions fix it
- Rest parameters ...args — the array, not arguments
Arrays, objects, and destructuring
Array methods (map/filter/reduce), object literals, spread/rest, and destructuring with defaults.
Prerequisite: Lessons 1–4
What to look for:
- The Exploring tab — destructuring section completely
- Spread (...) operator for arrays and objects
- Object shorthand {name, age} instead of {name: name, age: age}
- Array methods: map (transform), filter (select), reduce (accumulate)
How to use this track: Each lesson links to the relevant Codex reference page. Use the reading level tabs (Curious / Exploring / Deep Dive). The "what to look for" bullets guide your focus. Come back for the quiz when ready.
Try it now
Edit the code and press Run — or Ctrl+Enter. No install needed.
Want a bigger editor with example snippets? Open the full JS playground →
Track quiz
Four questions to check your understanding of the Foundations track.
What is the output of: console.log(typeof null)?
Which value is truthy in JavaScript?
What does const prevent?
Arrow functions differ from regular functions in which key way?