Encontré esa tarea.
Descripción
const list = ["get0", "get1", "get2", "get3", "get4", "get5", "get6", "get7", "get8", "get9"]; const maxQuery = 5; const customFetch = (url) => new Promise((resolve, reject) => { if (Math.random() < 0.2) { setTimeout(() => reject("Error: " + url), (Math.random() * 1500) | 0); } else { setTimeout(() => resolve("Some data: " + url), (Math.random() * 500) | 0); } }); async function getData(list) { // ... // some code // ... } getData(list).then((result) => console.log(result));Pero no tengo la solución. Supongo que podría usar Promise y hacer un ciclo "for of" para trabajar con operaciones asíncronas. Pero no puedo combinarlo. Por favor alguna solución para esto