Let\'s create a simple Deferred object:
defer = $.Deferred( function ( defer ) { setTimeout( defer.resolve, 3000 ); });
The above Defer
With Deferred, you can control its state set.
set
When it comes to the Promise, you can read state and maybe attach callback. get
get