Created
August 29, 2016 11:42
-
-
Save mrself/eb5f1a0f1df2a10762a027351d92de7b to your computer and use it in GitHub Desktop.
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
// If you need chains | |
array.reduce(function(def, arrayItem) { | |
return def.then(function() { | |
// Access to arrayItem | |
// return $.get, $.post, $.ajax or another deferred | |
}); | |
}, $.when()).done(function(){ | |
// all deferred are completed | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment