JavaScript Runtime Model
Many weak interview answers treat JavaScript, V8, browser APIs, the event loop, and React as one machine. That model cannot explain why document exists only in a browser, why promise reactions are delayed, or why a React DOM update may appear before paint.
Read chapterExecution Contexts
Execution contexts explain how control moves between scripts, functions, generators, and async functions. Interviewers rarely want a list of specification fields. They want to know whether you can identify which invocation is running, which invocation owns a local value, and what happens when evaluation returns or suspends.
Read chapterThe Call Stack
Stack questions test whether you can reconstruct the path to a failure, understand why an error was—or was not—caught, and distinguish a blocked main thread from an asynchronous wait. These skills matter when debugging production bundles, React render failures, and callbacks whose visible stack no longer includes their scheduling origin.
Read chapterLexical Environments and Environment Records
“JavaScript searches outer scopes” predicts simple examples, but senior interviews go further: Why can an inner let throw before its declaration instead of reading an outer variable? Why does top level let differ from top level var ? Why do imports update when an exporter changes?
Read chapterScope and Identifier Resolution
Senior scope questions test more than “inner code can access outer variables.” They combine callbacks, shadowing, modules, temporal dead zones, globals, and property access. The core skill is identifying which lookup mechanism applies.
Read chapterClosures
Closures power callbacks, event handlers, promises, memoization, factory functions, module APIs, and nearly every React component. They are also a frequent source of weak interview answers. Saying “the inner function remembers the outer variables” predicts some behavior, but it does not explain mutation, shared state, loop bindings, stale React callbacks, or memory retention.
Read chapter`this` Binding
Weak explanations say that this refers to “the current object” or “the object that owns the function.” Neither rule predicts detached methods, callbacks, arrows, bound functions, constructors, or strict mode. Senior interviews expect you to read the call expression and identify the receiver without guessing from where the function was defined.
Read chapterMemory Management and Garbage Collection
“JavaScript has garbage collection” does not mean applications cannot leak memory. The collector can reclaim only state that is no longer reachable. A forgotten listener, unbounded cache, or module level registry can keep an obsolete interface and its entire object graph alive indefinitely.
Read chapterPart I Summary
This chapter is a compact interview ready review of the runtime foundations in Part I. It is designed to be sufficient for a quick prep before a senior frontend discussion.
Review Part 1