JavaScript Promise Reference
The Promise Object represents the completion or failure of an asynchronous operation and its results.
A Promise can have 3 states:
| pending | initial state |
| rejected | operation failed |
| fulfilled | operation completed |
Promise Object Methods & Properties
Revised December 2025
| Name | Description |
|---|---|
| catch() | Provides a function to be called when a promise is rejected |
| finally() | Provides a function to be called when a promise is fulfilled or rejected |
| then() | Provide two functions to be called when a promise is fulfilled or rejected |
Static Methods
| Name | Description |
|---|---|
| Promise.all() | Returns a single Promise from a list of promises When all promises fulfill |
| Promise.allSettled() | Returns a single Promise from a list of promises When all promises sette |
| Promise.any() | Returns a single Promise from a list of promises When any promise fulfills |
| Promise.race() | Returns a single Promise from a list of promises When the faster promise settles |
| Promise.reject() | Returns a Promise object rejected with a value |
| Promise.resolve() | Returns a Promise object resolved with a value |
| Promise.then() | Provides two callbacks: One funtion to run when a promise is fulfilled. One funtion to run when a promise is rejected. |
| Promise.try() | Executes a function and wraps its result in a promise. |
| Promise.withResolvers() | Returns an object containing a new Promise object and two functions to resolve or reject it. |