Junior — Senior
Determine the order of output to the console
livecode
Task condition
Specify the order in which the following will be printed to the console:
setTimeout(() => console.log('STM 1'), 0);
Promise.resolve().then(() => console.log('STM 2'));
Promise.resolve().then(() => setTimeout(() => console.log('STM 3'), 0));
setTimeout(() => console.log('STM 4'), 0);
console.log('STM 5');