Use async.eachSeries to traverse only the first of the array, and the callback function does not run (nor does it report an error)

as in the question, use async.eachSeries (data,function (item,callback) {}, function (err) {}) to operate asynchronously. The function function does nothing but the output console.log (item) item, only outputs the first one, and the callback function does not execute

.
Mar.14,2021

take a closer look at the example on the official website:

async.everySeries(['file1','file2','file3'], function(filePath, callback) {
    fs.access(filePath, function(err) {   // 
        callback(null, !err)   // 
    });
}, function(err, result) {
    // if result is true then every file exists
});
Menu