- Mastering JavaScript Promises
- Muzzamil Hussain
- 123字
- 2021-07-16 13:46:46
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.
推薦閱讀
- Dynamics 365 for Finance and Operations Development Cookbook(Fourth Edition)
- Mastering JavaScript Functional Programming
- 一步一步學Spring Boot 2:微服務項目實戰
- C程序設計簡明教程(第二版)
- GraphQL學習指南
- 趣學Python算法100例
- Rust Essentials(Second Edition)
- Learning OpenStack Networking(Neutron)(Second Edition)
- Integrating Facebook iOS SDK with Your Application
- HTML5 APP開發從入門到精通(微課精編版)
- MySQL從入門到精通(軟件開發視頻大講堂)
- Mastering Business Intelligence with MicroStrategy
- Bootstrap for Rails
- 一步一步跟我學Scratch3.0案例
- JavaEE架構與程序設計