JavaScript Promises Guide
Promises represent asynchronous operations. They provide .then/.catch for handling results and errors, chaining for sequential operations. The guide walks through Creating Promises, Chaining & Combinators. `new Promise((resolve,reject) => {...})`. `resolve(value)` on success, `reject(error)` on failure. `Promise.resolve("done")` — immediate resolve. `Promise.reject("error")` — immediate reject. States: pending, fulfilled, rejected (settled once changed). `.then(fn).catch(fn).finally(fn)` — chain handlers. `Promise.all([p1,p2])` — wait for all. `Promise.allSettled([p1,p2])` — wait for all (no reject). `Promise.race([p1,p2])` — first to settle. `Promise.any([p1,p2])` — first to resolve. The guide is organized into 2 sections that build on each other, each pairing a prose explanation with runnable code. Related guides: Arrays, Strings, Numbers, Math, Date. This is one of 145 JavaScript guides on JS Reference — see the full list on the guides page. Practice what you learn in the JavaScript playground, and look up any unfamiliar term in the JavaScript glossary.