Async Await Result
Multiple Choice Medium
Question
What does await do inside an async function?
Hint
await waits for a Promise to settle.
Explanation
await pauses the execution of the async function until the Promise resolves, then returns the resolved value. If the Promise rejects, await throws the rejection reason. This makes asynchronous code look synchronous and is easier to read than .then() chains. Only works inside async functions.
Related Resources
Related Lessons
- Async JavaScript
Learn async JS.
Look up unfamiliar terms
A beginner-friendly glossary explains jargon in plain English — variables, functions, DOM, Promise, and more.
Decode error messages
Plain-English explanations of common errors — what they mean, why they happen, and how to fix them.
Build real projects
Apply what you learned by building guided projects with starter code and solutions.