Quick Challenge Blitz1 of 5
code•what happens-next•javascript
0s
+20 XP
1/5JavaScript Microtask vs Macrotask Event Loop
What is the exact order of console logs when this script executes in the JavaScript event loop?
javascript
console.log('1');
setTimeout(() => console.log('2'), 0);
Promise.resolve().then(() => console.log('3'));
console.log('4');