Promises to the Rescue
Get introduced to the states and power of promises.
Newer asynchronous functions in JavaScript are designed to return a promise instead of taking a callback.
Definition: A promise is an object through which a function may propagate an error or result sometime in the future.
States
At any time, a promise is in one of three states:
- Pending
- Resolved
- Rejected
Get hands-on with 1400+ tech skills courses.