console.log("async1 start")
await async2()
resolve()
console.log("after resolve")
}
const async2 = async () => {
console.log("async2")
}
console.log("after func define")
setTimeout(()=>{
console.log("set timeout")
},0)
new Promise(async (resolve)=>{
await async2()
console.log("promise running")
async1(resolve)
console.log("promise end")
}).then(()=>{
console.log("then start")
setTimeout(()=>{
console.log("timeout trigger")
},0)
})
console.log("script end")