JavaScript, async and await keywords


Open Source Your Knowledge, Become a Contributor

Technology knowledge has to be shared and made accessible for free. Join the movement.

Create Content

Call multiple functions with await in parallel

If you try this code :

Sequential multiple awaits

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

Parallel multiple awaits

You can await anything

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

You can await anything
Open Source Your Knowledge: become a Contributor and help others learn. Create New Content