PRACTICE / UNDERSTAND / REPEAT

JavaScript: Async JavaScript

Practice async javascript with self-contained questions. Check your answer, then use the explanation to understand the reasoning.

16 questionsAnswers explainedFree · no login
Question 1 of 16
Async JavaScript · Code recallQuestion link ↗

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.