A Promise is an object that might produce a successful result or failed result in the future. The successful result is named “resolve” and the failed result is named “reject”. When a Promise object returns reject, it means an error occurred.
The Promise might be in three possible states:
fulfilled: meaning that the promise is successfully finished.
rejected: meaning that the promise is failed.
pending: meaning that the promise is running.
#Shorts #Promise