DEV Community

Discussion on: 3 Javascript creepy concepts explained to my mom

Collapse
 
ironydelerium profile image
ironydelerium

On promises: it's also worth noting that 'then' and 'catch' both also return promises.

The return value of the function passed to then or catch (or, if they return a promise, the final state of that promise) is the value of the promise; if they throw, it becomes the rejection reason.