JSFiddle - React, Tailwind, and code Playground

JavaScript

var N = 10;
var asynch      = function (options, fNext) {
    console.log(options);
    setTimeout(fNext,500);
}// do something asynchronously} 
var chain       = {f:[]} // chain of asynchronous functions
var args        = function(n){return n;} //return arguments to feed n'th asynch function }
for (n=0;n<N;n++) 
{
    (function(n){
        var a       = args(n);
        var ftmp    = n==N-1? function(){} : function(){chain.f[n+1]();};
        chain.f[n]  = function () {asynch(a, ftmp)}
    })(n);
}
chain.f[0]()  // initiate asynchronous chain