When handling errors in an async function, if an error is not caught within the function, it will cause the returned Promise to be in a ________ state.

  • Pending
  • Fulfilled
  • Rejected
  • Completed
When an uncaught error occurs in an async function, the returned Promise will be in a "Rejected" state. In the Promise lifecycle, it can start as "Pending," move to "Fulfilled" upon success, or "Rejected" upon an error.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *