- A deferred object is an object than can create a promise and change its state to
resolved
or rejected
. Deferreds are typically used if you write your own function and want to provide a promise to the calling code. You are the producer of the value.
- A promise is, as the name says, a promise about a future value. You can attach callbacks to it to get that value. The promise was “given” to you and you are the receiver of the future value. You cannot modify the state of the promise. Only the code that created the promise can change its state.
Please Disable AdBlock Plus and Refresh Website