Scope, closures and data behaviour
Be able to trace where a value comes from, how long it remains reachable and whether an operation mutates shared data. Explain closures through practical uses such as event handlers, factories and private state.
- ✓Lexical scope and closures
- ✓Primitive and reference behaviour
- ✓Mutation and immutable updates
- ✓Equality, coercion and safe comparisons
Async JavaScript and the event loop
Understand the order of synchronous work, microtasks and tasks well enough to diagnose UI timing issues. Good answers also cover error propagation, cancellation and coordination of independent requests.
- ✓Promises and async/await
- ✓Task and microtask ordering
- ✓AbortController and stale requests
- ✓Parallel versus sequential work
Objects, prototypes and modules
Know how property lookup and object composition work, but keep explanations connected to application code. Compare classes, functions and composition based on ownership and change—not style preference.
- ✓Prototype lookup
- ✓Class behaviour and private fields
- ✓ES modules and live bindings
- ✓Dependency boundaries
Browser performance and memory
Connect JavaScript work to the main thread and user experience. Know how long tasks, repeated layout, large collections and retained listeners can make an interface slow over time.
- ✓Main-thread work and responsiveness
- ✓Layout and paint triggers
- ✓Event delegation
- ✓Leaks, cleanup and measurement
Robust application code
Senior interviews often use ordinary production failures: duplicate requests, stale results, unclear errors or unsafe input. Show how you would make the behaviour explicit and testable.
- ✓Input validation
- ✓Useful error handling
- ✓Race-condition prevention
- ✓Unit and integration test boundaries