What are JavaScript Promises?

Answer

A Promise is an object representing the eventual completion or failure of an asynchronous operation. A Promise is in one of three states: pending (initial, neither fulfilled nor rejected), fulfilled (operation completed successfully, has a value), or rejected (operation failed, has a reason). Create: new Promise((resolve, reject) => { /* async work */ resolve(value); /* or */ reject(error); }). Consume with chaining: promise.then(value => { }).catch(error => { }).finally(() => { }). then() returns a new Promise, enabling chains. Promise.all([p1, p2, p3]) waits for all and rejects if any fails. Promise.allSettled() waits for all regardless of rejection. Promise.race() resolves/rejects with the first settled. Promise.any() resolves with the first fulfilled. Promises solve "callback hell" and are the foundation of async/await.