Promises in JavaScript
- A Promise is an object representing the eventual completion or failure of an asynchronous operation.
States of a Promise:
Pending
: The initial state, neither fulfilled nor rejected.Fulfilled
: The operation was completed successfully.Rejected
: The operation failed.