1.

What do you mean by promise?

Answer»

A PROMISE is an OBJECT which shows the result of the asynchronous operation. The result can be a resolved value or a REASON why the process failed like “a network ERROR occurred.

A promise can be any of the 3 states:-
  • Pending - the promise’s result hasn’t yet been identified because the asynchronous operation has not been completed yet.
  • Fulfilled - the asynchronous operation has completed, and the promise has now a resolved value.
  • Rejected - the asynchronous operation has failed, and the promise has a reason that indicates why the process failed.


Discussion

No Comment Found