Async/await is the solution IMO for this scenario where you have to sequentially run async tasks.
Antón Molleda

It is so true, Async/Await is the ROCK STAR of handling asynchronous problem in JS ES7, however considering compatibility issue, there is still many of business/projects are running ES5 as a services, this solution is still valuable.

Like what you read? Give Peter Chang a round of applause.

From a quick cheer to a standing ovation, clap to show how much you enjoyed this story.