PRACTICE / UNDERSTAND / REPEAT

JavaScript practice question

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

1 questionAnswers explainedFree · no login

Try this question

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.