Skip to main content
Journey Uncommon Logo
JourneyUncommon
mediumJavaScriptpractical event-loop modelSingle-choice MCQ

What is the output, given how promise `.then` callbacks interleave on the microtask queue?

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