Тогда так на колбеках
function one(callback) {
setTimeout( function() {
callback("First");
}, Math.random() * 1000);
}
function two(callback) {
setTimeout( function() {
callback("Second");
}, Math.random() * 500);
}
function three(callback) {
setTimeout( function() {
callback("Third");
}, Math.random() * 100);
}
function runCallback(s) {
console.log(s);
}
const stream = (log, ...queue) => queue.shift()(s => (log(s), queue.length && stream(log, ...queue)))
stream(runCallback, one, two, three)