Tags
Promises Review
2 0
Review of Promises powered by the Slant community.
Promises are used as a proxy for a value that isn't known at the time it's created. While in callback functions your code executes in a nested callback, Promises provide an alternative approach that allows you to access asynchronous method return values with synchronous methods. A promise can either become rejected with a reason or fulfilled with a reason. The then function can be used to chain promises.