写出下面结果
const promise = new Promise((resolve, reject) => {
console.log(1)
resolve()
console.log(2)
})
promise.then(() => {
console.log(3)
})
console.log(4)
// 答案:1243
let a = () => {
console.log(1)
}
let b = () => {
console.log(2)
}
function fn() {
a()
setTimeout(() => {
b()
}, 0);
console.log(3)
}
fn() // 132