The Frontend Foundation: A Full-Stack Map from JS Closures to Browser Rendering
Frontend interviews at large Chinese tech firms routinely probe this exact syllabus, and the depth expected — from the IEEE 754 representation of 0.1 to the internal hook linked list — exceeds what most Western bootcamps and mid-level roles require. A developer who can trace a setState call through Fiber's work loop and explain why a closure over a stale state variable breaks is operating at a senior-plus level.
The core JavaScript section dissects the event loop, closures, prototype chains, and floating-point precision, connecting each concept to real-world React behavior like stale state, memory leaks, and hook ordering. The React chapter maps Fiber's linked-list architecture, the Lane priority model, and the commit pipeline, explaining why synthetic events fire after native ones and how the diff algorithm uses two rounds of traversal to handle list reordering.
Browser fundamentals cover the rendering pipeline from DOM/CSSOM construction through layout, paint, and compositing, with concrete triggers for reflow and how GPU layers bypass it. The networking section contrasts HTTP/1.1 keep-alive with HTTP/2 multiplexing and binary framing, then walks through TLS 1.2's two-RTT handshake and the hybrid encryption that protects it.
Engineering coverage includes Webpack's compilation phases, Vite's esbuild pre-bundling, pnpm's hard-link dependency tree, and a full caching strategy from Cache-Control max-age through Etag negotiation. Security and monitoring round out the map with XSS escape vectors, CSRF double-token patterns, and white-screen detection via MutationObserver.
The syllabus treats React's internal implementation — Fiber nodes, Lane bitmasks, hook linked lists — as standard interview material, not library internals to abstract away. This expectation produces engineers who debug rendering by reasoning about work loops rather than trial-and-error.
Connecting closures directly to React's stale-state bug and memory leaks turns an academic JS concept into a diagnostic tool. The explanation that a closure over a function component's scope variable persists because the timer callback holds a reference is more actionable than generic 'closures capture variables' definitions.
The event loop comparison between browsers and Node — where Node drains microtasks per phase rather than per macro task — is a subtlety that trips up developers moving isomorphic code between environments, especially around process.nextTick ordering.
Floating-point precision is taught not as a trivia question but through the IEEE 754 bit layout (sign, exponent, mantissa) and the exact reason 2^53 - 1 is the max safe integer. This level of detail means candidates are expected to explain why BigInt exists, not just that it does.
The caching section correctly distinguishes no-cache from no-store — a distinction most developers get wrong — and explains Etag's server-side computation cost as a tradeoff against Last-Modified's lower precision for dynamic content.