FrontendInterviews.dev

672. Promise.race with Empty Input

Easy•

Predict the output.

const p = Promise.race([])
let done = false
p.then(() => { done = true })
setTimeout(() => console.log(done), 0)

What is printed in the console?

Select an option and submit your answer.
Next Problem