LOGBOOK

HELP

Quiz Entry - updated: 2026.07.05

What is a Promise in JavaScript?

A Promise is an object representing the eventual completion or failure of an asynchronous operation.

Promises have three states:

  • Pending - initial state, neither fulfilled nor rejected
  • Fulfilled - operation completed successfully
  • Rejected - operation failed

You can attach handlers with .then() for success and .catch() for errors, or use async/await syntax for cleaner code.

Go deeper:

  • doc MDN: Promise — the reference for states, then/catch/finally, and combinators like Promise.all().
  • doc MDN: How to use promises — a learn-by-doing guide that builds from .then() chains up to async/await.

From Quiz: WEBT / Backend Integration | Updated: Jul 05, 2026