S
Size: a a a
S
ГЩ
ДК
KS
const arr = [5, 4, 3, 2, 1];
const getData = async (ids) => Promise.all(ids.map(id => fetch('https://jsonplaceholder.typicode.com/todos/' + id)
.then(response => response.json())
getData(arr).then(res => {res.forEach((el, idx)=> {console.log(arr[idx], el)})
})ДК
y
ДК
y
V
const requests = [getData(5), getData(4), getData(3)]
for await (const
res of requests) {}
KS
ДК
KS
V
y
ДК
ДК
y
ДК
KS
V