- ECMAScript Cookbook
- Ross Harrison
- 54字
- 2021-08-27 19:27:40
Chaining Promises
So far in this chapter, we've seen how to use promises to run single asynchronous tasks. This is helpful but doesn't provide a significant improvement over the callback pattern. The real advantage that promises offer comes when they are composed.
In this recipe, we'll use promises to combine asynchronous functions in series.