Sobes.tech
Junior — Senior

What result will appear in the console – example 73

livecode

Task condition

What output will be obtained in the console when executing the following code:

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

setTimeout(() => console.log(2), 10);

queueMicrotask(() => {
    console.log(3);
    queueMicrotask(() => console.log(4));
});

console.log(5);