async function makePizza(sauceType = 'red') { let doughPromise = makeDough(); let saucePromise = makeSauce(sauceType); let sauce = await saucePromise; let cheese = await grateCheese(sauce.determineCheese()); let dough = await doughPromise; dough.add(sauce); dough.add(cheese); return dough; }
Even with async/await, raw promises are still key to writing optimal concurrent javascript
Daniel Brain
1K31

Great and clean example how to code with async/await syntax.

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.