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

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.

主站蜘蛛池模板: 瑞金市| 南乐县| 阿荣旗| 金寨县| 乌苏市| 藁城市| 芒康县| 博客| 青铜峡市| 监利县| 葫芦岛市| 扬中市| 彝良县| 梧州市| 双牌县| 措美县| 云阳县| 和硕县| 曲松县| 房山区| 清河县| 五大连池市| 内丘县| 凌海市| 鸡东县| 昭通市| 松潘县| 蕉岭县| 临清市| 青阳县| 玉溪市| 霍林郭勒市| 宁河县| 五莲县| 墨竹工卡县| 建宁县| 普兰县| 历史| 巩留县| 广宗县| 庄河市|