Cool code : concurrent async calls

Posted on: 2017-04-26
var myAsyncFunc = async function () { const [ a, b ] = await Promise.all([ promiseFunc1(), promiseFunc2() ]); // the two calls are made at the same time, and we get back two variable // that can be used right away : console.log(a); console.log(b); }