Created
October 14, 2014 09:39
-
-
Save meson10/d46c801567d7fdae9b12 to your computer and use it in GitHub Desktop.
future promise
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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