JavaScript Promise Methods

About This Index
This page is the JavaScript Promise Methods index for the tutorial track. Each row links to a full guide with syntax, three runnable examples, browser notes, and FAQs.
Learn what a promise is and how its three states work on /js/promise. Use this page when you need a specific method such as Promise.all(), then(), or catch().
Even then(), catch(), and finally() return a new promise. That is what lets you chain them, and it is why you read the final result with then() or await.
How to Call a Promise Method
Static methods are called on Promise; instance methods are called on a promise you already have:
// Static (on Promise): create or combine promises
const ready = Promise.resolve(42); // already fulfilled
const both = Promise.all([ready, Promise.resolve(8)]);
const { promise, resolve } = Promise.withResolvers(); // settle later (ES2024)
// Instance (on Promise.prototype): react to one promise
both
.then((values) => values[0] + values[1]) // 50
.catch((error) => 0) // only on failure
.finally(() => console.log('done')); // always
promise.then((text) => console.log(text));
resolve('settled from outside'); JavaScript Promise Methods Table
All method guides in this JavaScript tutorial series (11 tutorials), grouped by what they do.
Wait for many promises
4 methodsStatic helpers that take a list (any iterable) of promises and combine them into one promise.
| Method | Description | Tutorial |
|---|---|---|
Promise.all() | Wait for every promise; get all values in input order, or the first rejection. | Open |
Promise.allSettled() | Wait for every promise to settle and get a status report for each one. Never rejects. | Open |
Promise.any() | Get the first promise that fulfills; reject with an AggregateError only if all of them fail. | Open |
Promise.race() | Settle like the first promise that settles, whether it fulfills or rejects. | Open |
Create a promise
3 methodsStatic helpers that make a new promise: already fulfilled, already rejected, or one you settle later from outside.
| Method | Description | Tutorial |
|---|---|---|
Promise.resolve() | Turn any value (or thenable) into a promise; a native promise is returned as is. | Open |
Promise.reject() | Create a promise that is already rejected with the reason you pass. | Open |
Promise.withResolvers() | Create a promise together with its resolve and reject functions, to settle it later. | Open |
Run code safely
1 methodCall a function and turn both its result and its errors, synchronous or not, into one promise (ES2025).
| Method | Description | Tutorial |
|---|---|---|
Promise.try() | Call a function and always get a promise back, even when it throws synchronously. | Open |
React to the result
3 methodsInstance methods you call on a promise to use its value, handle its error, or clean up. Each returns a new promise.
Promise Constructor and Key Facts
Not methods, but terms every Promise tutorial uses. They are listed here for quick reference.
| Term | What it means | Since |
|---|---|---|
new Promise(executor) | Create a promise yourself. The executor (resolve, reject) => { ... } runs immediately; call resolve(value) or reject(error) once. | ES2015 |
Promise.prototype | The object every promise inherits from. then(), catch(), and finally() live here, so you call them on a promise: p.then(...). | ES2015 |
value instanceof Promise | Checks for a native promise. Many libraries also accept any thenable. | ES2015 |
Thenable | Any object with a then(onFulfilled, onRejected) method. Promise.resolve(), then() return values, and await all adopt thenables. | ES2015 |
Microtask | Promise handlers run in the microtask queue: after the current synchronous code, before timers. That is why then callbacks always run later. | ES2015 |
States | pending, then either fulfilled (with a value) or rejected (with a reason). Once settled, a promise never changes again. | ES2015 |
AggregateError | The error Promise.any() rejects with when every input rejects. Its errors array holds all the reasons. | ES2021 |
async / await | Syntax built on promises: an async function returns a promise, and await pauses until a promise settles. | ES2017 |
Frequently Asked Questions
Start with Promise.all()
Learn to wait for several promises at once and collect every result in order.
14 people found this page helpful
