Type d'évaluation
Mise en situation réelle
Analyse
Intelligence Artificielle
Compétences ciblées
Scénario Technique
Context A data aggregation script fetches information from three different APIs and combines the results into a single report. The Problem The current script awaits each API call sequentially, taking 3 seconds total when all three could run in parallel in 1 second. Current Code const a = await fetchA(); const b = await fetchB(); const c = await fetchC(); Constraints Refactor to run all three fetch calls in parallel with Promise.all. Handle the case where any one of them fails without blocking the others using Promise.allSettled. Log which calls succeeded and which failed. Expected Deliverable A Node.js script using Promise.all and Promise.allSettled to run concurrent async operations with individual failure handling.
Prêt à évaluer ce talent ?
Accédez à l'interface de test complète pour soumettre votre architecture ou votre code.