Please write more efficient implementation of the next function: const someFunc = async ()=>{ const a = await somePromise(); const b = await someOtherPromise(); return [a,b]; }
Anonymous
I answered a wrong answer .... I wasn't thinking about simply using Promise.all() const someFunc = () => { return somePromise().then(a => { return someOtherPromise().then(b => { return [a, b]; }); }); };
Check out your Company Bowl for anonymous work chats.