...

/

Fundamentals of Chaining Promises

Fundamentals of Chaining Promises

Get started with chaining promises and catching errors.

We'll cover the following...

Introduction

Promises may seem like little more than an incremental improvement over using some combination of a callback and the setTimeout() function, but there is much more to promises than meets the eye. More specifically, there are several ways to chain promises to accomplish more complex asynchronous behavior.

Press + to interact
Chaining promises
Chaining promises

Each call to then(), catch(), or finally() actually creates and returns another promise. This second promise is settled only once the first has been fulfilled or rejected. ...

Create a free account to view this lesson.

By signing up, you agree to Educative's Terms of Service and Privacy Policy