Really simple, but so I remember the syntax
const result1 = await functionOne(params1); const result2 = await functionTwo(params2);
const [ result1, result2 ] = await Promise.all([ functionOne(params1), functionTwo(params2) ]);
source
Date: 2020-07-01
Tags: javascript
Share: