js get promise state code example
Example: promise states javascript
// A JavaScript Promise can be in several states:
// - Pending - response is not ready yet. Please wait.
// - Fulfilled - response is ready. Success. Take the data.
// - Rejected - an error occurred. Handle it.