Sep 4, 2018 · 1 min read
Great Article!
Just one thing, this can be also achieved by Promise.all(), right?
let promiseArr = [];
ids.forEach((id, index) => { promiseArr.push(asyncMapFunc(id));
}Promise.all(promiseArr)
.then((resultArr) => console.log(resultArr));
// resultArr will contain the results in order of promise inputed //in promiseArr array.