JavaScript VM internals, EventLoop, Async and ScopeChains
summary
Explains that JavaScript does a two-phase compile+execute so declarations hoist, shows how function calls allocate heap execution contexts with a lexical backpointer, and demonstrates closure = function + scope chain where returned functions keep their outer heap alive because GC is by reachability not reference count. Uses browser/node Web APIs plus a Philip Roberts sPrima visualization to show event loop pulls callbacks from queues, replaces a blocking forEach with setTimeout callbacks, and proves async generators and queued callbacks keep the UI responsive.
AI-written summary · about
chapters (9)
- 0:00Introduction
- 0:58What makes programming interesting
- 5:40Agenda
- 10:05Execution
- 15:45Variable shadowing
- 23:18Closure
- 24:03What is Closure
- 26:23Demo
- 37:03Question
related talks
36mDear JavaScript...
41mThe Eventloop in JavaScript - How does it work?
45mBehind the Scenes of JavaScript: What We Use Without c…
55mJavaScript the Grumpy Parts
01h 14mJavaScript the Grumpy Parts
44mBehind the Scenes of JavaScript: What We Use Without Understanding
30mActually Understanding Asynchronous JavaScript
18mEvent loop and asynchrony in JavaScript
