Skip to content
RED SAG Skills
hardStudy question · answer published in JavaScript interview questions, so no pointsjavascriptpromisesnodejs

A promise awaited too late

In Node.js, slowTask takes 2 s and failingTask rejects after 100 ms. Why can the process crash with an unhandled rejection?

const a = slowTask()
const b = failingTask()
await a
await b // inside try/catch
Choose one answer

Discussion 0

Join free to post in the discussion.

Related questions