Latest note
Why JavaScript forEach Cannot Break or Wait for Async Callbacks
Use an indexed loop to stop at a selected job, and keep job promises separately when later code needs access to them.
Latest notes
Solve JavaScript implementation and debugging problems with working examples that explain runtime behavior, tradeoffs and failure cases in browsers and Node.js.
All notesLatest note
Use an indexed loop to stop at a selected job, and keep job promises separately when later code needs access to them.
Choose and implement browser workers
Choose by who starts the work and what must happen: page-initiated computation needs messages, while interception needs a Service Worker controlling the requesting page.
Pass a fresh controller’s signal to fetch, cancel with a button, and catch AbortError from either the request or its response body.
Investigate runtime performance, memory and storage
Take a baseline, repeat and reverse one UI action, then compare snapshots and follow Retainers to investigate what remains.
Resolve two search requests in reverse order to see the stale-result bug, then use a request ID to keep only the latest result.
A browser cache-hit callback can defer its notification, then schedule a promise handler and one more microtask. Follow that chain to see why the timer waits.