var count = 0;
async.whilst(
function () { return count < 5; },
function (callback) {
count++;
setTimeout(callback, 1000);
},
function (err) {
}
);
is there any way that the first function passes the variable to the second function being processed. For instance:
async.whilst(
function () { var data = processSomeDataSync(); return data },
function (data, callback) {
process(data)
},
function (err) {
}
);
samol source
share