Re:A Modern JavaScript Tutorial
by golergka on Monday December 07, 2020 @01:40PM
(#25335448)
const [result1, result3] = await Promise.all([task1(), task2.then(res => task3(res))])
[ Parent
| on HN ]
Could that be written
const task2then3 = async () => task3(await task2());
const [result1, result3] = await Promise.all([task1(), task2then3()])