chaining promises

    0

    12

    My JavaScript recipes

    chaining multiple promises

    Shortcut: promise.all

    const promise1 = Promise.resolve(3);
    const promise2 = 42;
    Promise.all([promise1, promise2]).then((values) => {
      console.log(values);
    });
    Codiga Logo
    Codiga Hub
    • Rulesets
    • Explore
    • Cookbooks
    • Playground
    soc-2 icon

    We are SOC-2 Compliance Certified

    G2 high performer medal

    Codiga – All rights reserved 2022.