Oftentimes, you want to kick off multiple promises in parallel rather than awaiting them in sequence. This lesson explains how that can be achieved in a readable manner using await
, the Promise.all()
method, and destructuring assignment.
Hey, really nice series, thanks. So, what you think would be the main difference between using async await and generators?
Generators offer additional flexibility. The async
and await
keywords offer syntactic sugar for simple awaits, but with yield
and generators, you get more fine-grained control over when and how to pause and resume a function.