Which of the following is used to consume a Promise?

  • then()
  • catch()
  • finally()
  • consume()
To consume the result of a Promise, you typically use the then() method. It allows you to specify what should happen when the Promise is successfully resolved. The other options are also Promise methods but serve different purposes, like error handling with catch() or running code regardless of the Promise's outcome with finally().
Add your answer
Loading...

Leave a comment

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