Skip to content

Instantly share code, notes, and snippets.

@meson10
Created October 14, 2014 09:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save meson10/d46c801567d7fdae9b12 to your computer and use it in GitHub Desktop.
Save meson10/d46c801567d7fdae9b12 to your computer and use it in GitHub Desktop.
future promise
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