.then()
Term side of the Card
Topic: Promise
Unit title: .then()
Categories: Method
Explanation side of the Card
Explanation: The method used with promises to specify what to do when a promise resolves successfully. It takes a callback function that handles the resolved value of the promise and can optionally take a second callback function to handle rejection, though `.catch()` is commonly used for this purpose. It returns a new `Promise` object for chaining further actions.
Browser compatibility:
- The chrome browser supports this feature starting from version 32
- The edge browser supports this feature starting from version 12
- The firefox browser supports this feature starting from version 29
- The safari browser supports this feature starting from version 8
Availability: