JavaScript: Zero to Hero

A complete quiz-based curriculum covering JavaScript from first principles to expert-level, production-grade knowledge. Every quiz is self-contained — read the explanations, not just the answers, to build a full mental model of the language.

How to Use This Quiz Track

  • Work through the parts in order; later quizzes assume knowledge from earlier ones.
  • Each quiz has 20 multiple-choice questions, ordered from basic recall to edge cases to best-practice judgment calls.
  • Click Show Answer only after committing to a choice — the explanations cover why distractors are wrong, which is where the real quizing happens.
  • Questions favor "gotchas" (coercion traps, event-loop ordering, this binding surprises) over rote recall, so expect to be wrong sometimes on the first pass.

Prerequisites

None for Part 1. Basic command-line comfort helps for the tooling and Node.js-flavored questions in later parts.

Curriculum

Part 1 — Foundations

#TopicWhy It Matters
01Introduction & SetupWhere JS runs, engines, and the ECMAScript version treadmill — context for every quirk that follows.
02Variables & Data Typesvar/let/const scoping and the primitive vs. reference type split drive most beginner bugs.
03Operators & Expressions== vs ===, coercion rules, and operator precedence are classic interview traps.
04Control FlowTruthy/falsy edge cases and loop scoping (let vs var in closures) trip up even experienced devs.
05Functions & ScopeHoisting, the TDZ, and function vs. arrow semantics underpin everything else in JS.
06Strings & Template LiteralsImmutability, Unicode surrogate pairs, and tagged templates are common gotchas in string handling.
07Objects & PropertiesProperty descriptors, shallow vs. deep copies, and key coercion shape real-world bugs.
08Arrays & Array MethodsMutating vs. non-mutating methods and sparse arrays cause subtle production issues.
09Destructuring & SpreadDefault values, nested patterns, and spread vs. rest are everywhere in modern codebases.

Part 2 — Core Language Mastery

#TopicWhy It Matters
10Classes & PrototypesClasses are sugar over the prototype chain — understanding both explains inheritance bugs.
11The this Keywordthis binding rules are the single most-misunderstood part of JavaScript.
12Closures & Lexical ScopeClosures power memoization, private state, and are a top source of loop-variable bugs.
13Higher-Order Functionsmap/filter/reduce composition is the backbone of idiomatic modern JS.
14ModulesESM vs. CommonJS interop and circular imports are frequent real-world pain points.
15Callbacks & the Event LoopMicrotask vs. macrotask ordering explains why Promise.then beats setTimeout(0).
16PromisesChaining, error propagation, and Promise.all vs. allSettled are daily async concerns.
17Async/AwaitAwait ordering, parallel vs. sequential awaits, and try/catch scope are frequent bugs.
18Error HandlingCustom errors, finally semantics, and swallowed rejections shape reliability.

Part 3 — Browser & Application Layer

#TopicWhy It Matters
19The DOMReflow/repaint costs and live vs. static node lists affect UI performance.
20EventsBubbling, capturing, and delegation are essential for building efficient UIs.
21Web Storage & APIslocalStorage quotas, synchronous cost, and Fetch API quirks matter in production.
22Timers & SchedulingsetTimeout drift, requestAnimationFrame, and debounce/throttle are UI staples.
23Functional ProgrammingCurrying, composition, and immutability patterns are increasingly idiomatic in JS.

Part 4 — Advanced & Professional

#TopicWhy It Matters
24Design PatternsModule, singleton, observer, and factory patterns recur across every large JS codebase.
25TestingMocking, spies, and async test pitfalls determine whether a test suite is trustworthy.
26Performance & OptimizationMemory leaks, debouncing, and V8 optimization quirks matter at scale.
27Tooling & Build SystemsBundlers, tree-shaking, and source maps are unavoidable in modern JS delivery.
28TypeScript EssentialsStructural typing and type narrowing are now baseline JS-adjacent knowledge.
29SecurityXSS, prototype pollution, and unsafe eval usage are the most common JS vulnerabilities.
30Exercises & Projects (Capstone)A mixed-review capstone pulling together async, closures, this, and performance.