functioncallback(){returnnewPromise((resolve,reject)=>{setTimeout(()=>{console.log("callback");},3000);});}asyncfunctionasyncCall(){console.log('calling');awaitcallback();console.log("ABC");console.log(123);}asyncCall();// Console log// calling// Promise {<pending>}// callback// didn't log ABC, 123 beacuse callback didn't resolve(), // thus code after await will never runfunctioncallback1(){returnnewPromise((resolve,reject)=>{setTimeout(()=>{resolve(100);},3000);});}asyncfunctionasyncCall(){console.log('calling');letres=awaitcallback1();console.log(res);console.log("ABC");console.log(123);// expected output: "resolved"}asyncCall();// Console log// calling// Promise pending// 100// ABC// 123// logged ABC and 123 because promise(callback1) resolved// code after await blocked until promise resolved// in order to no-blocking code after promise// we should prevent to use await// but use Promise.then()// asyncfunctionasyncCall(){console.log('calling');callback().then(()=>{console.log("then")});console.log("ABC");console.log(123);}asyncCall();// Console log// calling// ABC// 123// Promise {<fulfilled>: undefined}// callback// then