来,摸鱼转动你🉐️小脑壳,看看这个怎么玩 const p = function() { return new Promise((resolve, reject) => { const p1 = new Promise((resolve, reject) => { setTimeout(() => { resolve(1) }, 0) resolve(2) }) p1.then((res) => { console.log(res); }) console.log(3); resolve(4); }) } p().then((res) => { console.log(res); }) console.log('end'); 输出的是什么???????😱
展开
2
评论