Six short snippets with setTimeout, promises, await and queueMicrotask. Predict the order, run it, then read why. The one rule: sync code first, then all microtasks, then the next task.
Send many requests, keep the successes, and report the failures instead of losing everything to one rejected promise. Plus limiting how many run at once.
Hide page numbers and "next" links inside an async generator, then loop over every record with for await. Stop early and the remaining pages are never fetched.
We value your privacy
We use cookies to keep this website working and, with your permission, enable additional features, measurement and advertising. Accept all, reject all optional cookies, or learn more to customize your choices. Necessary cookies stay active.