function resloveAfter(){
return new Promise(resolve=>{
setTimeout(()=>{
resolve('res')
},2000)
})
}
async function asyncCall(){
console.log('1');
var result = await resloveAfter()
console.log(result);
}
function call(){
console.log('2');
resloveAfter().then(res=>{
console.log(res);
})
// var result = resloveAfter()
// console.log(result);
}
asyncCall()
call()