Skip to content
Lesson 6 of 15

Step 1 of 5 · Reading · ~1 min

Learn

Async JavaScript

A few patterns you'll use over and over.

Promisify a callback API:

js

(Node has util.promisify to do this generically.)

Sleep:

js

Run multiple in parallel:

js

With a max concurrency — when you have 1000 things and don't want 1000 parallel requests:

js
Up nextthis and MethodsObjects in Depth

Discussion

Ask a question, share an insight, or help someone who’s stuck.

Sign in to post a comment or reply.

Loading…