问答题849/1593【Promise第34题】下面代码的输出是什么?

1async function async1() { 2 console.log("async1 start"); 3 await async2(); 4 console.log("async1 end"); 5} 6 7async function async2() { 8 console.log("async2"); 9} 10 11console.log("script start"); 12 13setTimeout(function() { 14 console.log("setTimeout"); 15}, 0); 16 17async1(); 18 19new Promise(function(resolve) { 20 console.log("promise1"); 21 resolve(); 22}).then(function() { 23 console.log("promise2"); 24}); 25console.log('script end') 26
难度:
2022-01-09 创建

赞赏支持

预览

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