JavaScript Deep Dive
The language internals that FAANG tests cold. Types, coercion, the prototype chain, scope, closures, this-binding, and the memory implications of every pattern.
The 7 primitives, the Object type, and the exact algorithm JavaScript uses when you write ==. Why [] == false is true, why {} + [] is 0, and how ToPrimitive actually works under the hood.
How JavaScript's prototype chain actually works at the specification level. __proto__ vs prototype, property lookup, Object.create, and why modifying built-in prototypes is a production landmine.
How JavaScript resolves variable names. Lexical scoping, the scope chain, variable resolution algorithm, and why inner functions can access outer variables — explained at the specification level.
What closures actually capture in V8, why they keep entire scopes alive, the classic for-loop trap, and the memory implications every senior engineer needs to understand.
What hoisting actually means at the spec level, why let/const have a TDZ, why typeof undeclaredVar is safe but typeof letVar in the TDZ throws, and the difference between function declarations and expressions.
The 4 rules that determine what 'this' is, in exact priority order. new > explicit > implicit > default. Arrow functions, the method extraction trap, and why 'this' in callbacks loses context.
The hidden metadata behind every object property. writable, enumerable, configurable — the three flags that control what you can do with properties. Object.freeze vs Object.seal vs Object.preventExtensions, and why freeze is shallow.
Symbol.iterator and the for...of protocol. Generator functions, yield, lazy iteration, and async generators. The metaprogramming primitives that power modern JavaScript.
Intercept and redefine fundamental object operations. Proxy traps, the Reflect API, and real use cases: validation, logging, reactive systems (Vue 3), and observables. Plus the performance cost you need to know.
Weak references in JavaScript. WeakMap for private data and metadata. WeakSet for object marking. WeakRef for caches and soft references. FinalizationRegistry for cleanup callbacks.
8 tricky type coercion and equality questions. Trace the algorithm step by step. If you can predict all 8 correctly, you understand JavaScript types better than most senior engineers.
8 tricky this-binding scenarios. Apply the four rules in priority order. Arrow functions, method extraction, new vs bind, and the traps that break production code.