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

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.

主站蜘蛛池模板: 宜良县| 盐津县| 安康市| 大关县| 灵璧县| 大埔县| 安溪县| 五常市| 武汉市| 林芝县| 凌海市| 平罗县| 汤阴县| 应用必备| 宣武区| 历史| 高要市| 横峰县| 新津县| 乌审旗| 西丰县| 天门市| 甘孜县| 始兴县| 九寨沟县| 定安县| 托克托县| 泸水县| 漳平市| 博客| 柳江县| 漳浦县| 二连浩特市| 东宁县| 武穴市| 大同县| 新田县| 垣曲县| 白城市| 河池市| 新平|