See the written version of this tutorial for links to prerequisites and related tutorials: https://heynode.com/tutorial/wait-mul...
Sometimes in Node, we need to execute multiple asynchronous operations concurrently, wait for them all to complete, and then do something with the combined result. An example of this would be to wait for multiple API calls to finish before gathering results and using them to form another API call. To accomplish this, we can use JavaScript's Promise.all() to wait for multiple Promises to resolve, before doing something with their results. This allows us to write code in Node that’s easier to maintain and understand.
In this tutorial we'll:
Learn how to use JavaScript's Promise.all to wait for multiple Promises to return
Practice with a use case for Promise.all using NPM node-fetch
Heynode.com: The best online Node.js courses and tutorials to help you solve hard problems fast.