Promise chain
A promise chain is a sequence of linked promise reactions in which each step receives the preceding step’s fulfillment value or handles its rejection.
The Joy of JavaScript
A promise chain is a sequence of linked Promise reactions in which each step receives the result or failure of the previous step.
- How it is used
- Structures linear asynchronous flows as composable, forward-moving data transformations.
- How deep it goes
- Explains linking, settlement, nested-promise flattening, broken chains, error recovery, and finally, with runnable snippets.
- Examples
- Uses string transformations, nested promises, thrown errors, default recovery values, unhandled rejection warnings, and finally.
- What you can do after
- Builds linear Promise workflows, preserves nested results and failures, and diagnoses accidental disjoint chains.
Get Programming with JavaScript Next: New features of ECMAScript 2015, 2016, and beyond
A sequence of linked promise operations in which the outcome of one promise feeds subsequent handlers.
- How it is used
- Coordinates dependent asynchronous operations and handles their errors as a single flow.
- How deep it goes
- Works through a repeating image chain, its memory leak, and rejection propagation; stops short of broader promise internals.
- Examples
- Uses a random-image workflow that fetches, fades, pauses, and repeats, with a catch that restarts on failure.
- What you can do after
- Understand how linked handlers carry outcomes and rejections, and how to prevent a repeating workflow from extending one chain indefinitely.
Related concepts
- promiseused by · A JavaScript Promise is an object representing the eventual completion or failure of an asynchronous operation and its resulting value or reason.
- memory leakaddresses · A memory leak is the unintended retention of allocated memory that a program no longer needs, preventing that memory from being reclaimed for reuse.
- compositionequivalent to · Composition is a technique for combining simpler functions, components, or operations into a larger structure or behavior.
- then methoduses · The JavaScript Promise then method registers fulfillment and rejection handlers and returns a new promise that represents their results.
- Promise#catchuses · Promise#catch is a JavaScript Promise method that registers a handler for rejection and returns a Promise for the handler's outcome.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.

