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

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.

主站蜘蛛池模板: 弋阳县| 历史| 渭南市| 綦江县| 双牌县| 云梦县| 潞西市| 翁源县| 大悟县| 乌审旗| 江达县| 云浮市| 连江县| 马公市| 麦盖提县| 屯门区| 泸水县| 鄂尔多斯市| 平遥县| 城固县| 分宜县| 水富县| 大丰市| 长顺县| 平乡县| 隆林| 运城市| 东乌珠穆沁旗| 黄石市| 石屏县| 天津市| 固安县| 安义县| 长岛县| 炎陵县| 雷山县| 印江| 岐山县| 疏勒县| 保亭| 冀州市|