To handle both resolve and reject in a single method, you can use the .finally method after a(n) _______ block in asynchronous functions.

  • try
  • await
  • then
  • catch
To handle both resolve and reject outcomes in a single method, you can use the .finally() method after a try block in asynchronous functions. This ensures that the provided code block is executed regardless of whether the Promise is resolved or rejected.
Add your answer
Loading...

Leave a comment

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