Skip to content

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.

1
Types, Coercion, and the Equality Algorithm
intermediate

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.

11 min read
2
The Prototype Chain and Inheritance
intermediate

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.

10 min read
3
Scope Chains and Lexical Scope
intermediate

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.

9 min read
4
Closures and Their Memory Cost
intermediate

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.

11 min read
5
Hoisting and the Temporal Dead Zone
intermediate

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.

10 min read
6
this Binding Rules
intermediate

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.

12 min read
7
Property Descriptors and Object Immutability
intermediate

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.

10 min read
8
Symbols, Iterators, and Generators
intermediate

Symbol.iterator and the for...of protocol. Generator functions, yield, lazy iteration, and async generators. The metaprogramming primitives that power modern JavaScript.

12 min read
9
Proxy and Reflect
intermediate

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.

12 min read
10
WeakRef, WeakMap, and WeakSet
intermediate

Weak references in JavaScript. WeakMap for private data and metadata. WeakSet for object marking. WeakRef for caches and soft references. FinalizationRegistry for cleanup callbacks.

12 min read
11
Quiz: Predict the Output — Coercion
intermediate

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.

7 min read
12
Quiz: Predict the Output — this
intermediate

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.

8 min read