JavaScript Internals
How engines actually run your code: hidden classes, inline caches, the event loop, garbage collection, and the optimizations your code triggers — or kills.
2 lessons · ~12 min of reading · 7 exercises
- 01
Hidden classes and inline caches: how V8 really handles your objects
JavaScript objects look like hash maps, but engines refuse to treat them that way. Understand shapes, transition chains, and inline caches — and the innocent-looking code that quietly de-optimizes yours.
6 min read3 exercisesadvanced
- 02
The event loop beyond setTimeout: microtasks, task queues, and starvation
You know the interview answer. This is the production version: how microtask and task queues actually interleave, where await really yields, and how a queue can starve your UI without a single blocking call.
6 min read4 exercisesadvanced
Coming next in this track
- Garbage collection: generational GC and what leaks really look like
- From source to machine code: Ignition, Sparkplug, TurboFan
- Why your array got slow: elements kinds and packed vs holey