Skip to content

Instantly share code, notes, and snippets.

@dusual
Forked from meson10/future
Last active August 29, 2015 14:07
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 dusual/65f787fe269dfaae4491 to your computer and use it in GitHub Desktop.
Save dusual/65f787fe269dfaae4491 to your computer and use it in GitHub Desktop.
function abc() {
var deferred = $.Deferred();
(function() {
var a = 1;
deferred.resolve(a);
})();
return deferred.promise();
}
var combinedPromise = $.when(abc());
combinedPromise.done(function() {
console.log(arguments);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment