DEV Community

Discussion on: Explain Async/Await Like I'm Five

Collapse
 
danieliverant profile image
Daniel Liverant

the code waits until result1 is set and just then continue to result2.
if you want to wait for them both to complete and then continue your code you need to use
await Promise.all([result1, result2])