Hacker News new | ask | show | jobs
by Nullabillity 2544 days ago
Promises are started eagerly, so

    const xP = getX();
    const yP = getY();
    const x = await xP;
    const y = await yP;
is just as parallel as

    const [x, y] = Promise.all([getX(), getY()]);
1 comments

Whoops, you're right! I hadn't thought it through.