const someIDs = [1, 2, 3];
const users = someIDs.map(async(ID) => {
const user = await getUser(ID);
return user;
});
cosnole.log(users);
(async() => {
const someIDs = [1, 2, 3];
const users = [];
for (const ID of someIDs) {
const user = await getUser(ID);
users.push(user);
}
console.log(users);
})();