Back
Close

JavaScript, async and await keywords

Magus
25.4K views

Call multiple functions with await in parallel

If you try this code :

You can see that the job function is called sequentially. But in such code, you probably want to make the 3 calls in parallel. You have to use your old friend Promise.all

You can await anything

You can use the await keyword even if the result is not a promise.

Create your playground on Tech.io
This playground was created on Tech.io, our hands-on, knowledge-sharing platform for developers.
Go to tech.io
codingame x discord
Join the CodinGame community on Discord to chat about puzzle contributions, challenges, streams, blog articles - all that good stuff!
JOIN US ON DISCORD
Online Participants