

There are multiple approaches to this problem, but most rely on Javascript Promises, either from a third-party library in ES5 and earlier or ES6’s built-in Promises. The pattern is to look something up that returns a collection, and then look something else up for each of the members in the collection. I see this quite a bit in my software engineering course where teams are required to synthesize new information from two distinct third-party data sources. One of the toughest things to get your head around in Javascript is how to handle nested asynchronous calls, especially when a function depends on the result of a preceding one. Composing the results of nested asynchronous calls in Javascript
