Favorites

JavaScript Promise.resolve() Method

☕
Enjoying this site?

Help keep it running with a small coffee donation. Every bit of support is appreciated!

Buy us a coffee
Promise.resolve()
JavaScript Promise Static methodThis method is supported by all modern browsers.
Updated 28th November 2026

The Promise.resolve() static method returns a promise that is already fulfilled with a given value.

Description

The Promise.resolve() static method returns a fulfilled promise with the given value. If the value is already a promise, that promise is returned. It's useful when a function should always return a promise even when the result is available straight away, such as from a cache.

When given a "thenable", any object with a then() method, it adopts that object's eventual state, which is how promises from different libraries can work together. Wrapping a value with Promise.resolve() also guarantees that any then() callbacks run asynchronously, after the current code finishes.

Inside an async function, returning a value does the same thing automatically, so Promise.resolve() is mostly needed in code that builds promise chains by hand.

Syntax

Promise.resolve(value)

Parameters

  • valueThe value to resolve with, or a promise or thenable to follow.

Return Value

A promise fulfilled with the value (or the same promise, if one was passed).

Example

Promise.resolve(42).then(v => console.log('Value:', v));

const cache = new Map([['a', 'cached']]);
function load(key) {
  return cache.has(key) ? Promise.resolve(cache.get(key)) : fetch('/api/' + key);
}
load('a').then(console.log);

Browser Support

The following information will show you the current browser support for the Promise.resolve() method. Hover over a browser icon to see the version that first introduced support for this method.

This method is supported by all modern browsers.

Desktop

Chrome
Edge
Firefox
Opera
Safari

Tablets & Mobile

Chrome Android
Firefox Android
Opera Android
Safari iOS
Samsung Internet
Android WebView
-
Supported Unknown Not supported
☕
Enjoying this site?

Help keep it running with a small coffee donation. Every bit of support is appreciated!

Buy us a coffee