Skip to content

Instantly share code, notes, and snippets.

@DeTeam
Created December 27, 2012 18:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DeTeam/4390494 to your computer and use it in GitHub Desktop.
Save DeTeam/4390494 to your computer and use it in GitHub Desktop.
// It JavaScript it's okay to do like that:
friend.gift = function(){
var deferred = $.Deferred();
somewhenInFuture(function(gift){
deferred.resolve(gift);
})
return deferred.promise();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment