O'Reilly logo

Get Programming with JavaScript Next: New features of ECMAScript 2015, 2016, and beyond by JD Isaacks

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Lesson 31. Advanced promises

After reading lesson 31, you will be able to

  • Create your own promises
  • Wrap callback-based methods with promises
  • Use and understand how to properly write nested promises
  • Understand how error handling propagates in promise chains

In the previous lesson you learned the basics of promises. We’ll now take a more advanced look at creating new promises and converting asynchronous code to use promises. We’ll look at advanced error handling, using promises for multiple asynchronous calls, and other advanced usages.

Consider this

Sometimes you need to make multiple asynchronous calls to get the data you need. A piece of data relies on another piece of data, which relies on yet another piece of data. Yet all ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required