Réponse
.catch() ne prend qu'un seul argument (onRejected)
Colonne
Explication
.catch() ne prend qu'un seul argument (onRejected) qui sera invoqué avec la raison de l'échec (reasonRejection). The .catch() function takes only one argument, onRejected. this failure handler will be invoked with the reason for rejection
Question
Quelle différence entre les fonctions .then() et .catch() dans la gestion d'une promesse (promise) ?
Thématique