Slide 12
Slide 12 text
async.parallel([
function(cb) { setTimeout(function() { cb(null, 'one'); }, 1000); },
function(cb) { setTimeout(function() { cb(null, 'two'); }, 2000); }
], function(err, results){
// the results array will equal ['one', 'two']
});
async.series([
function(cb) { fs.exists('file1', cb); },
function(cb) { fs.exists('file2', cb); }
], function(err, results){
// the results array will equal [true, false]
});