PRACTICE / UNDERSTAND / REPEAT

JavaScript: Promises

Practice promises with self-contained questions. Check your answer, then use the explanation to understand the reasoning.

17 questionsAnswers explainedFree · no login
Question 1 of 17
Promises · MCQQuestion link ↗

Which promise method runs when the promise rejects?

Choose one answer
Answer & explanation

Answer: .catch()

`.catch(handler)` handles rejection. `.finally()` runs after either fulfillment or rejection and does not receive the result.