Promise states

A promise is always in one of these states:

  • Fulfilled: If the resolve callback is invoked with a non-promise object as the argument or no argument, then we say that the promise is fulfilled
  • Rejected: If the rejecting callback is invoked or an exception occurs in the executor scope, then we say that the promise is rejected
  • Pending: If the resolve or reject callback is yet to be invoked, then we say that the promise is pending
  • Settled: A promise is said to be settled if it's either fulfilled or rejected, but not pending

Once a promise is fulfilled or rejected, it cannot be transitioned back. An attempt to transition it will have no effect.

Get Learn ECMAScript - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.