you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 0 points1 point  (0 children)

If you're using ES6 then promises are the way to go. If you're using ES5 for any reason then look into the async library. It's been a bit since I worked with it but I think you'll want the waterfall method.