Working with Promises

In this chapter, we will cover the following recipes:

  • Creating and waiting for Promises
  • Resolving Promise results
  • Rejecting Promise errors
  • Chaining Promises
  • Starting a Promise chain with Promise.resolve
  • Using Promise.all to resolve multiple Promises
  • Handling errors with Promise.catch
  • Simulating finally with the Promise API

Get ECMAScript Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.