let getdata=function(){ return new Promise((resolve,reject)=>{ resolve('aaa'); }) } let aa=null; let getData=async function(){ aa=await getdata(); console.log(aa); console.log('异步执行成功!'); } getData();