async.seriesTo handle events one by one
suggest change/In async.series,all the functions are executed in series and the consolidated outputs of each function is passed to the final callback. e.g/
var async = require(‘async’); async.series([
function (callback) {
console.log('First Execute..');
callback(null, 'userPersonalData');
},
function (callback) {
console.log('Second Execute.. ');
callback(null, 'userDependentData');
}
], function (err, result) { console.log(result); });
//Output:
First Execute.. Second Execute.. [‘userPersonalData’,‘userDependentData’] //result
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents