问答题968/1524【Promise第八题】下面代码的输出是什么?

1const promise = new Promise((resolve, reject) => { 2 console.log(1); 3 setTimeout(() => { 4 console.log("timerStart"); 5 resolve("success"); 6 console.log("timerEnd"); 7 }, 0); 8 console.log(2); 9}); 10promise.then((res) => { 11 console.log(res); 12}); 13console.log(4);
难度:
2022-01-09 创建

赞赏支持

预览

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