function testFunction (){ const promise1 = /* some async task*/ const promise2 = /* some async task*/ const promise3 = /* some async task*/ return; }
async function testFunction (){ const promise1 = /* some async task*/ const promise2 = /* some async task*/ const promise3 = /* some async task*/ const promises = [promise1, promise2, promise3]; await Promise.all(promises); return; }