console.log('main1')
new Promise((resolve, reject) => {
setTimeout(() => {
resolve()
})
console.log('promise1')
}).then(() => {
console.log('promise2')
})
setTimeout(() => {
console.log('settimeout')
}, 0)
console.log('main2')