Which method should be used to handle the rejection of a Promise?

  • reject()
  • catch()
  • error()
  • failure()
To handle the rejection of a Promise, you should use the catch() method. It allows you to specify what to do when the Promise is rejected with an error. The other options are not standard methods for handling Promise rejection in JavaScript.
Add your answer
Loading...

Leave a comment

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