JavaScript Core — Senior Interview Prep
Language fundamentals through the lens of “explain what your code actually does.” The numbered senior top-ups (event loop, this, prototypes, generators, modules, memory, errors) cover what post-2022 interviews probe beyond closures and array methods.
Files
Fundamentals
- Data types — primitives, coercion, equality
- Data structures — Map/Set/objects/arrays
- Array methods
- Closures and lexical scope
Functions, objects, this
thisand binding — call/apply/bind, arrows, method extraction- Prototypes and the prototype chain
- Classes
Async
- The event loop — macrotasks, microtasks, rendering
- Callbacks · Promises · async/await
- Promises — advanced (combinators,
withResolvers, cancellation) - Generators and iterators
- ES modules — static/dynamic import, live bindings, tree shaking
Memory & errors
- Memory and garbage collection — leaks, WeakMap/WeakRef
- Errors and error handling — custom errors,
cause, stacks
How an interviewer probes JS core depth
- “What’s the output?” — event-loop ordering of sync / microtask / macrotask. See The Event Loop — Macrotasks, Microtasks, Rendering.
- “Why is
thisundefined here?” — method extraction / arrow vs function. See this and Binding. - “Make this lazy / stream it” — generators and
for await...of. See Generators and Iterators. - “This app leaks memory — find it” — listeners/timers/detached DOM, heap snapshots. See Memory and Garbage Collection.
- “Why didn’t your
try/catchcatch that?” — async error propagation. See Errors and Error Handling.
Related
External resources
Saved question banks (general-purpose; the notes above go deeper):