官术网_书友最值得收藏!

States of a promise

Promise is based on three states. Each state has a significance and can be used to drive a certain level of result as per the need. This can help a programmer choose as per his/her need. The three states of a promise are as follows:

  • Pending: This is the initial state of a promise
  • Fulfilled: This is the state of a promise representing a successful operation
  • Rejected: This is the state of a promise representing a failed operation

Once a promise is fulfilled or rejected, it is immutable (that is, it can never change again).

With reference to the concepts discussed earlier, it's now clear what a promise is and how you can use it with all its potential.

主站蜘蛛池模板: 祁阳县| 达州市| 高密市| 凤台县| 龙南县| 呼图壁县| 乌拉特前旗| 桓台县| 松原市| 寿阳县| 体育| 孝感市| 清丰县| 甘谷县| 宾阳县| 砀山县| 河北区| 巨野县| 胶州市| 曲阳县| 黑河市| 洛宁县| 桑日县| 潜山县| 张掖市| 利川市| 康乐县| 兴业县| 岳池县| 平利县| 永丰县| 张家界市| 彰化市| 临潭县| 二手房| 稷山县| 澳门| 永胜县| 河池市| 增城市| 隆林|