Event Loop & Microtasks
What is the output sequence?
Promise.resolve()
.then(() => console.log(1))
.then(() => console.log(2));
Promise.resolve()
.then(() => console.log(3))
.then(() => console.log(4));
Promise.resolve()
.then(() => console.log(1))
.then(() => console.log(2));
Promise.resolve()
.then(() => console.log(3))
.then(() => console.log(4));