Javascript – why is await not working in the second syntax?
the following code results into the expected output function toppings_choice() { return new Promise((resolve, reject) => { setTimeout(() => { resolve(console.log("which topping would you love?")); reject("not working"); }, 3000); }); } async function kitchen() { console.log("A"); console.log("B"); console.log("C"); await toppings_choice();…