问答题861/1588【Promise第17题】下面代码的输出是什么?

1const promise = new Promise((resolve, reject) => { 2 setTimeout(() => { 3 console.log('timer') 4 resolve('success') 5 }, 1000) 6}) 7const start = Date.now(); 8promise.then(res => { 9 console.log(res, Date.now() - start) 10}) 11promise.then(res => { 12 console.log(res, Date.now() - start) 13}) 14
难度:
2022-01-09 创建

赞赏支持

预览

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