Sobes.tech
Junior — Senior

Order of message output to the console (example 61)

livecode

Task condition

What will be the sequence of console logs when executing the following code?

console.log('script start');

setTimeout(function() {
    console.log('setTimeout');
}, 0);

Promise
.resolve()
.then(function() {
    console.log('promise1');
})
.then(function() {
    console.log('promise2');
});