~/talk

Actually Understanding Asynchronous JavaScript

Talkat NEJS Conf 2018 · on Friday, 2018-07-27· [javascript, frontend-architecture]
slides:none on file

Explains why JavaScript appears asynchronous but relies on the environment (browser/Node) and the call stack and event loop interaction, lays out the three run‑to‑completion rules, and demonstrates concrete tools: raw XMLHttpRequest callbacks refactored into Promises, wrapping callbacks with new Promise, using Promise.all, and async/await (promises + generators). Shows practical fixes: breaking a 10k–1M loop with timers to keep UI responsive, use requestAnimationFrame for smooth animation, and notes alert blocks the queue.

AI-written summary · about

  1. 0:00Start
  2. 6:57Asynchronous Javascript Is Based on Events
  3. 7:31How Does Synchronous Code Work
  4. 7:41The Call Stack
  5. 8:24Call Stack
  6. 10:13Event Queue
  7. 12:40Behavior Object Model
  8. 13:27Set Timeout
  9. 15:12Infinite Loops
  10. 17:43Callback Pattern
  11. 19:08Error Callback
  12. 21:57Chaining Promises
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.