JavaScript Promise resolve() Method

Beginner
6 min read
Updated: Nov 2026
3 examples
Static method

Definition

Promise.resolve(value) returns a promise for value. A plain value becomes a fulfilled promise. A native promise comes back as the very same promise, with no copy. A thenable (an object with a then() method) is followed, and the new promise gets its result, good or bad. So one code path can handle “a value or a promise”.

Remember
Promise.resolve(5)        → new promise, fulfilled with 5
Promise.resolve(p)        → p itself (when p is a native Promise)
Promise.resolve(thenable) → new promise that follows thenable
Promise.resolve()         → fulfilled with undefined

p === Promise.resolve(p)  → true

Syntax

Call resolve on the Promise constructor with a value, a promise, or nothing.

JavaScript
Promise.resolve()
Promise.resolve(value)
CallWhat it does
Promise.resolve()A promise fulfilled with undefined. Handy as the start of a chain.
Promise.resolve(value)A promise fulfilled with value.
Promise.resolve(promiseOrThenable)The same promise, or a new promise that follows the thenable.

Built into JavaScript since ES2015 (ES6).

Library declarations
JavaScript
Promise.resolve(value)   // returns a Promise

// value: any value, a Promise, or a thenable

Parameters

ParameterDescription
valueOptional. A plain value, a promise, or a thenable. A thenable is asked for its result through its then() method.

Return Value

Return ValueDescription
Promise (same object)When value is a native promise, that exact promise comes back, whatever its state.
Promise (new object)Fulfilled with a plain value, or following the thenable. It is rejected if the thenable rejects or throws.

JavaScript Examples

Example 1 — Promise.resolve(p) Returns p

Wrap a promise, wrap a plain number, and compare the results with ===.

JavaScript
const original = Promise.resolve('hello');
const same = Promise.resolve(original);
const fresh = Promise.resolve(42);

console.log(original === same);
console.log(fresh === original);
console.log(new Promise((resolve) => resolve(original)) === original);

same.then((value) => console.log('value: ' + value));
Promise.resolve().then((value) => console.log('no argument: ' + value));
Try It Yourself

How It Works

  1. Wrap a promise that exists. Promise.resolve(original) hands back the same object, so original === same prints true. Nothing is copied.
  2. Wrap a plain value. 42 is not a promise, so a new promise is created. The new Promise(...) line also makes a new object, so its comparison is false.
  3. No argument means undefined. Promise.resolve() is fulfilled with undefined. Both callbacks run after the three comparison lines.

Example 2 — Adopt a Thenable

A thenable is an object with a then() method that is not a real promise. Promise.resolve() turns it into one.

JavaScript
const goodThenable = {
  then(onFulfilled) {
    onFulfilled('from the thenable');
  }
};

const badThenable = {
  then(onFulfilled, onRejected) {
    onRejected(new Error('thenable failed'));
  }
};

const adopted = Promise.resolve(goodThenable);
console.log(adopted instanceof Promise);
console.log(adopted === goodThenable);

adopted.then((value) => console.log('fulfilled: ' + value));

Promise.resolve(badThenable).catch((error) => {
  console.log('rejected: ' + error.message);
});
Try It Yourself

How It Works

  1. A thenable only needs then(). goodThenable is a plain object. It has no promise state, just a then method that calls the function it is given.
  2. A real promise is built around it. adopted is a new native promise, not the thenable. JavaScript calls then() for you and copies the outcome.
  3. Failures are adopted too. When badThenable calls onRejected, the new promise becomes rejected, and catch() prints the message.

Example 3 — Handle a Value or a Promise the Same Way

One function returns a string when the answer is cached, and a promise when it must wait. Wrapping the result makes both safe to chain.

JavaScript
const cache = { 1: 'Asha' };

function loadName(id) {
  if (cache[id]) {
    return cache[id];
  }
  return new Promise((resolve) => {
    setTimeout(() => resolve('User ' + id), 30);
  });
}

Promise.resolve(loadName(1))
  .then((name) => {
    console.log('first: ' + name);
    return Promise.resolve(loadName(2));
  })
  .then((name) => {
    console.log('second: ' + name);
  });
Try It Yourself

How It Works

  1. One function, two kinds of answer. loadName(1) returns the string "Asha" at once. loadName(2) returns a promise fulfilled after 30 milliseconds.
  2. Wrap before you chain. Promise.resolve(loadName(1)) is always a promise, so .then() is safe. On a plain string it would fail.
  3. A returned promise is followed. The first then returns another wrapped result. The second then waits for it and receives "User 2".

Browser & Runtime Support

Promise.resolve() is part of ES2015 (ES6), together with the Promise object itself.

✓ Baseline · ES2015

Promise.resolve()

Supported in every modern browser, plus Node.js, Deno, and Bun.

98% Modern browser support
Google Chrome All modern versions
Full support
Mozilla Firefox All modern versions
Full support
Apple Safari All modern versions
Full support
Microsoft Edge All modern versions
Full support
Node.js All current releases
Supported
Deno All releases
Supported
Internet Explorer No native support
Not supported
Promise.resolve() Excellent

Bottom line: Safe in every modern browser and runtime. The examples print plain strings, so the output is the same in Node.js and in the browser.

Frequently Asked Questions

A promise. A plain value gives a new promise fulfilled with it. A native promise comes back as is. A thenable gives a new promise that follows it.
No. For a native promise you get the same object back, so Promise.resolve(p) === p is true. A plain value or a thenable always gives a new promise.
Any object with a then() method, such as a promise from an older library. Promise.resolve() converts it into a real promise, so catch(), finally(), and await work on it.
The constructor always makes a new promise, even when value is already one. Promise.resolve(value) reuses a native promise and is shorter to write.
Yes. If you pass a rejected promise, or a thenable that rejects, the result is rejected. Resolve means "follow this value", not "succeed". Use catch() as usual.

Next: Promise.try()

Run a function inside a promise, so a sync throw becomes a rejection.

try() tutorial →

About the author

Mari Selvan M P
Mari Selvan M P 🔗

Developer, cloud engineer, and technical writer

  • Experience 12 years building web and cloud systems
  • Focus Full Stack Development, AWS, and Developer Education

I write practical tutorials so students and working developers can learn by doing—from databases and APIs to deployment on AWS.

11 people found this page helpful