269240
function test() {
return new Promise((resolve, reject)=>{
resolve(123);
});
}
test().then((a)=>{
console.log(a);
}).then((b)=> {
console.log(b);//这行代码被执行了
});
test().then()返回的是一个处于pending状态的promise对象,为什么会执行then中的console.log(b)呢?不是只有被resolve的promise对象才会执行then中的第一个方法吗?