I am trying to create what I think is referred to as a \"Waterfall\". I want to sequentially process an array of async functions (jQuery promises).
Here\'s a contr
For a waterfall, you need an async loop:
(function step(i, callback) { if (i < tasks.length) doTask(tasks[i]).then(function(res) { // since sequential, you'd usually use "res" here somehow step(i+1, callback); }); else callback(); })(0, function(){ console.log("all done"); });