Grokking Advanced JavaScript
Vote

0% completed

​

Async/Await

What if asynchronous code could be written from top to bottom, one step per line, like ordinary synchronous code? The promise chain for the online shop example came close, but each step still lived inside its own handler function. Async functions remove those handlers. You write the steps as ordinary statements, and the function pauses at each step until its promise settles.

Async functions use two keywords, async and await. They are built on promises: every async function returns a promise, and await waits for one

.....

.....

.....

Like the course? Get enrolled and start learning!

Reading Progress

0%


Vote for new content