SOURCE

console.log('task 1');
setTimeout(()=>{
    console.log('macro task')
},0)
Promise.resolve().then(()=>{
    console.log('micro task 1')
})
Promise.resolve().then(()=>{
    console.log('micro task 2')
})
console.log('task 2')
console 命令行工具 X clear

                    
>
console