问答题764/1510【Promise第36题】下面代码的输出是什么?

1async function async1 () { 2 await async2(); 3 console.log('async1'); 4 return 'async1 success' 5} 6async function async2 () { 7 return new Promise((resolve, reject) => { 8 console.log('async2') 9 reject('error') 10 }) 11} 12async1().then(res => console.log(res))
难度:
2022-01-09 创建

赞赏支持

预览

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