Login to manage your account

Please enter a valid email address.
Forgot Password?
Please enter a valid password.
OR

Don't have an account yet? Sign up

What does the async keyword do to a function?

  1. A Runs it on a background thread
  2. B Makes it always return a Promise and allows await inside
  3. C Delays execution by one second
  4. D Prevents it from throwing errors
Answer

Makes it always return a Promise and allows await inside

JavaScript remains single-threaded. async wraps the return value in a resolved Promise and enables await, which pauses the function without blocking the thread.

All Javascript MCQs

Login to manage your account

Please enter a valid email address.
Forgot Password?
Please enter a valid password.
OR

Don't have an account yet? Sign up as