console.log(1)
new Promise(function (resolve,reject){
reject(true)
window.setTimeout(function (){
resolve(false)
},0)
}).then(function (value){
console.log(value)
}).catch(function (error){
console.log(3)
})
console.log(4)
结果:1 4 3
网友评论