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:
MDN: Promise — the reference for states,
then/catch/finally, and combinators likePromise.all().MDN: How to use promises — a learn-by-doing guide that builds from
.then()chains up toasync/await.