IT lexicon Programming Promise

Promise

Programming På svenska → Updated: 2026-07-30

A JS object that represents a future value — like a receipt you take and later cash in once the food is ready.

Three states: pending (waiting), fulfilled (done, with value), rejected (done, with error). You chain with .then() and .catch(), or use the more modern async/await.

Solves callback-on-callback-on-callback in sequential code. The foundation of all modern async JS.

← Back to the lexicon