How to chain execution of array of functions when every function returns deferred.promise?

Same idea, but you may find it slightly classier or more compact:

funcs.reduce((prev, cur) => prev.then(cur), starting_promise);

If you have no specific starting_promise you want to use, just use Promise.resolve().

Leave a Comment