let valute = {
AMD: {ID: 'R01060', NumCode: '051', CharCode: 'AMD', Nominal: 100, Name: 'Армянских драмов', Value: 13.7825},
AUD: {ID: 'R01010', NumCode: '036', CharCode: 'AUD', Nominal: 1, Name: 'Австралийский доллар', Value: 13.7825}
};
let string = '';
for (let [key, _value] of Object.entries(valute)) {
string += `${key}:\n`;
for (let [prop, value] of Object.entries(_value)) {
string += `${prop}: ${value}\n`;
}
string += '\n';
}
console.log(string);
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);
})();