var asyncFn1=()=>{
return new Promise(r=>
setTimeout(()=>r('time1'),2000)
)
}
var asyncFn2=()=>{
return new Promise(r=>
setTimeout(()=>r('time2'),2000)
)
}
async function oneByOne(){
const res1= await asyncFn1();
console.log('got res1 ',res1);
const res2= await asyncFn2();
console.log('got res2 ',res2);
const twoResult= res1+','+res2;
console.log('twoResult ',twoResult);
}
oneByOne();