问答题967/1515【Promise第40题】下面代码的输出是什么?

1const p1 = new Promise((resolve) => { 2 setTimeout(() => { 3 resolve('resolve3'); 4 console.log('timer1') 5 }, 0) 6 resolve('resovle1'); 7 resolve('resolve2'); 8}).then(res => { 9 console.log(res) 10 setTimeout(() => { 11 console.log(p1) 12 }, 1000) 13}).finally(res => { 14 console.log('finally', res) 15}) 16
难度:
2022-01-09 创建

赞赏支持

预览

题库维护不易,您的支持就是我们最大的动力!