PRACTICE / UNDERSTAND / REPEAT
JavaScript practice question
Practice async javascript with self-contained questions. Check your answer, then use the explanation to understand the reasoning.
1 questionAnswers explainedFree · no login
Try this question
Complete the syntax to pause until `loadUser()` settles.
const user = ___ loadUser();
Answer & explanation
Answer: await
`await` pauses the async function until the promise fulfills or throws on rejection.