Interview Q&A / JavaScript

BeginnerQuick answer1 min readUpdated 3 Oct 2026

What are the states of a Promise, and what happens if you resolve it twice?

SHORT ANSWER

A promise is pending, then becomes fulfilled with a value or rejected with a reason. Once settled it never changes, so later resolve or reject calls are ignored.

Explain it simply

A Promise is like an IRCTC booking request. At first it is pending. Then it ends one of two ways: the ticket is confirmed (fulfilled) or the booking fails (rejected). Fulfilled or rejected together are called settled.

The key rule is that a settled promise is locked. Its result can be read any number of times but can never change. If code calls resolve or reject again, JavaScript quietly ignores it.

The .then handlers always run asynchronously, even on an already-settled promise, as microtasks after the current code finishes.

Example

js
const p = new Promise((resolve, reject) => {
  resolve("done");
  reject(new Error("ignored"));
  resolve("again");
});

p.then((v) => console.log(v));          // Output: done
p.then((v) => console.log(v + "!"));    // Output: done!
console.log("sync first");              // Output: sync first

The real printed order is sync first, then done, then done!, because the handlers run after the current code. A promise can be read by many handlers.

What to say in the interview

"A promise starts pending and settles exactly once, either fulfilled with a value or rejected with a reason. After that it is immutable, and further resolve or reject calls are ignored. Handlers run asynchronously as microtasks."

Common mistakes

  • Thinking a rejected promise can be retried by calling resolve later.

#javascript#promises#async

Related questions

Practise more JavaScript questions

Test your recall with short answers, then return to the detailed explanations when you need context.

Open JavaScript quick answers →

Get new questions like this by email

One short email when something new and useful lands. No spam, unsubscribe in one tap.

By subscribing you agree to the Privacy Policy.