Exercise 1: Promise.all vs. a Sequential for Loop — Possible Solution ==================================================================== WHAT Promise.all(expiring.map(...)) ACTUALLY DOES ------------------------------ expiring.map(item => lookupIngredient(item.name)) immediately calls lookupIngredient for every expiring item, one right after another, without waiting for any of them to finish first - each call starts its own fetch to TheMealDB (or resolves instantly from cache) and returns a Promise right away. Promise.all then waits for every one of those already-in-flight Promises to settle. For five expiring ingredients that all need a real network request, this means five HTTP requests are in flight to TheMealDB at the same time, and the total wait is roughly as long as the single slowest request - not the sum of all five. WHAT A SEQUENTIAL for LOOP WOULD DO INSTEAD ------------------------------ A loop like for (const item of expiring) { await lookupIngredient (item.name); } would start the first request, wait for it to fully complete, only then start the second request, and so on. For five ingredients each taking roughly the same amount of time, the total wait would be roughly five times as long as a single request - the requests never overlap at all. WHY THIS WORKS AS AN ANSWER ------------------------------ It correctly identifies that map() starts every call immediately, before Promise.all ever waits on anything, and it correctly contrasts that against a sequential loop's own one-at-a-time behavior, naming the real practical consequence (total time roughly equal to the slowest single request vs. roughly the sum of all requests) rather than a vague "it's faster" claim.