问答题787/1530【Promise第33题】下面代码的输出是什么?

1async function async1 () { 2 console.log('async1 start'); 3 await new Promise(resolve => { 4 console.log('promise1') 5 resolve('promise resolve') 6 }) 7 console.log('async1 success'); 8 return 'async1 end' 9} 10console.log('srcipt start') 11async1().then(res => { 12 console.log(res) 13}) 14new Promise(resolve => { 15 console.log('promise2') 16 setTimeout(() => { 17 console.log('timer') 18 }) 19}) 20
难度:
2022-01-09 创建

赞赏支持

预览

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