PRACTICE / UNDERSTAND / REPEAT

JavaScript practice question

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

1 questionAnswers explainedFree · no login

Try this question

Errors · MCQQuestion link ↗

Can an outer synchronous try/catch catch an error thrown later inside a timer callback?

Choose one answer
Answer & explanation

Answer: No; handle it inside the callback or an associated async abstraction

The callback runs after the original try block has completed.