Skip to content

Instantly share code, notes, and snippets.

Last active January 26, 2016 10:47
What would you like to do?
function asyncOperation() {
// returns promise
var promises = [];
for (var i=0; i<=10; i++) {
var promise = asyncOperation();
// now we need to execute some logic after all promises get resolved
// we can use .all() as following
.then(function() {
console.log('all promises resolved!');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment