Part I — JavaScript Foundations
The section splits in two. Chapters 01–04 are the language's object model: how values are stored, where names resolve, and what class compiles down to. Chapters 05–06 are the runtime: how async work composes and fails, and the loop that schedules your callbacks.
Chapters
| # | Chapter | What it answers |
|---|---|---|
| 01 | Data Types, Variables and Built-ins | Which values copy, which share, and which methods mutate? |
| 02 | Scope and Closures | Where does a variable live, and why does this callback still see the old value? |
| 03 | The this Keyword | What is this, working from the call site alone? |
| 04 | Prototypes and Inheritance | What is class actually doing underneath? |
| 05 | Promises, Async/Await and Errors | How do you compose async work, and fail in a way that is recoverable? |
| 06 | The Event Loop | In what exact order will this code log? |
What Interviewers Probe For
Three questions carry most of the weight in this section, on top of the part-level signal:
- Do you know what a closure captures? Not the definition, but the consequence. Which variable does the captured reference point at? When does that keep an object alive? Why does the loop-with-
varbug produce the number it does? - Can you explain
thisfrom the call site? Four rules, in precedence order, applied to code you are seeing for the first time. Some candidates memorised "arrow functions do not havethis" and stopped there. The first method-extraction example catches them. - Do you treat errors as a design decision? Code review catches three common mistakes: swallowing a rejection, throwing a string, and losing the stack across an
await. Knowing which failures are recoverable, and which should crash the process, is a seniority marker.
Reading Order
Straight through. Chapters 05 and 06 are a pair, because a promise's callback runs where the event loop puts it. Do not skip 06 because you have seen the diagram before.
Interview sprint: 02 → 03 → 06 → 05. Closures, this, the event loop and promise composition account for most of what the language round asks.