Q1主动回忆难度 1
1/12
JavaScript 核心 · 初级 11
记忆强度
【Promise第25题】下面代码的输出是什么?
function runAsync (x) {
const p = new Promise(r => setTimeout(() => r(x, console.log(x)), 1000))
return p
}
Promise.all([runAsync(1), runAsync(2), runAsync(3)])
.then(res => console.log(res))