Too Long; Didn't Read
Promise in JavaScript is the way to wait for a certain action to process or complete. The promise has the following states: Pending: incomplete (initial state), neither fulfilled nor rejected. Fetch: Wait for the response from an API endpoint to retrieve data from a certain API endpoint. We can use promise in JavaScript in a different situation: wait for response from the request. We’ve covered the basics of promise in Javascript here. To learn more about Javascript, you can visit the site here.