Files
30-seconds-of-code/test/chainAsync/chainAsync.js

5 lines
101 B
JavaScript

module.exports = chainAsync = fns => {
let curr = 0;
const next = () => fns[curr++](next);
next();
};