Using _______ in front of a Promise-based function call makes JavaScript wait until that Promise settles and returns its result.
- Wait
- Hold
- Async
- Await
The keyword await is used in front of a Promise-based function call to make JavaScript wait for that promise to resolve or reject before proceeding with the code execution. It allows for writing asynchronous code in a more synchronous-like manner.
Loading...
Related Quiz
- In JavaScript, the _______ method is used to create a new object using an existing object as the prototype of the newly created object.
- Which HTTP status code indicates that the server has successfully processed the request but there is no content to send in the response?
- Why might for...of loops be preferred when working with asynchronous code?
- In JavaScript, the _________ property is a reference to an object from which the current object inherits properties.
- In JavaScript, instances are typically created using the _________ keyword.