Moyen
JavaScript Async ⭐ 130 XP
LAB 11 — Async/Await : gérer une tâche asynchrone
par Administrateur · ⏱ 60 min · 👁 4
Objectif
Comprendre Promise, await et gestion d'erreurs.
Prérequis
Module Async / Await terminé.
Scénario
Une fonction doit attendre une donnée distante et afficher un état de chargement ou une erreur.
Instructions
Créez une fonction async, utilisez await, encapsulez-la dans try/catch/finally et simulez succès puis échec.
Ressources
Promise, async, await, try/catch/finally.
Soumettre ma solution
Se connecter pour soumettre🔒 La solution se débloque après votre première soumission.