In Promises, the _______ function is used to transition a promise into a resolved state, while _______ is used for rejection.

  • resolve
  • then
  • reject
  • catch
The correct option is 'resolve.' The resolve function transitions a promise into a resolved state, fulfilling the promise. On the other hand, the 'catch' function is used to handle rejection and is associated with the 'reject' state. The 'then' function is used for chaining and handles both fulfillment and rejection.
Add your answer
Loading...

Leave a comment

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