DEV Community

Lavender
Lavender

Posted on

Using Promises in finally in ES6

promise
  .then((result) => { ··· })
  .catch((error) => { ··· })
  .finally(() => {
    /\*logic independent of success/error \*/
  })
Enter fullscreen mode Exit fullscreen mode

The handler is called when the promise is fulfilled or rejected

Useful links

Top comments (0)

Postmark Image

Speedy emails, satisfied customers

Are delayed transactional emails costing you user satisfaction? Postmark delivers your emails almost instantly, keeping your customers happy and connected.

Sign up