РГ
Size: a a a
РГ
РГ
РГ
IS
Promise.all([foo,bar,baz].map(f=>new Promise(r=>f(r)))).then(r=>r.forEach(i=>console.log(i)));
j
AE
РГ
AE
j
const results = []
const funcs = [foo, bar, baz]
let count = 0
funcs.forEach((func, index) => func((result) => {
results[index] = result
count++
if (count === funcs.length) {
console.log(results.join('\n'))
}
}))
AE
IS
IS
IS
IS
j
IS
IS
IS
СВ