.catch()
noun
say it: “KACH” /kætʃ/
The Promise method that runs a function if the promise fails.
What does .catch() do in JavaScript?
.catch() — A Promise method that schedules error handling for rejection.
orderReady.catch(error => {
showError(error);
});
In a sentence
- “The catch shows "Couldn't load products" when the request fails.”
Level: Journeyman · More JavaScript terms at this level
Updated