1const promise1 = Promise.resolve('First') 2const promise2 = Promise.resolve('Second') 3const promise3 = Promise.reject('Third') 4const promise4 = Promise.resolve('Fourth') 5 6const runPromises = async () => { 7 const res1 = await Promise.all([promise1, promise2]) 8 const res2 = await Promise.all([promise3, promise4]) 9 return [res1, res2] 10} 11 12runPromises() 13 .then(res => console.log(res)) 14 .catch(err => console.log(err))
本题为“单选题”