Skip to content
RED SAG Skills
medium10 pts · first answer countsjavascripterrorstimers

Error inside a setTimeout callback

Does the catch block run?

try {
  setTimeout(() => { throw new Error("boom") }, 0)
} catch (e) {
  console.log("caught")
}
Choose one answer

Discussion 0

Join free to post in the discussion.

Related questions