How do async and await work?
Answer out loud or in your head first, then compare.
Answer
A function marked async returns a Promise. Inside it, await lets you wait for a Promise to settle and keep working with its result in a readable order. When the result is an error, you can handle it with try/catch.
That wait pauses the rest of this function, not the whole server. Other tasks can be handled meanwhile. But the code before and after await still does ordinary work: if it contains a very heavy computation, marking the function async won't move it to another thread. Two consecutive await fetch() calls usually mean waiting one after the other, not at the same time.
Why it matters: A common source of wrong assumptions during live coding.
Possible follow-ups: How do you start two independent reads before waiting for their results?
How did it go? Be honest — “Not yet” puts the question on your review list.
Related questions
- Promise or async/await? — Node.js
Practise in code
- At most three active operations — runs tests in your browser
Further reading
- Node.js: The Event Loop(opens in a new tab)Docs; accessed 22.10.2026. Event loop phases, timers and differences between Node/libuv versions.