FrontendInterviews.dev

600. Event Loop Output Order

Easy•

Predict the output of the following snippet.

setTimeout(() => console.log(1));

Promise.resolve().then(() => console.log(2));

console.log(3);

What will be printed in the console?

Select an option and submit your answer.
Next Problem