async function start(){ var arr=[1,2,3,4,4],promiseArr=[] arr.forEach(async(e)=>{ let res=await pp(e); console.log("res"+res) }) let res= await Promise.all(promiseArr) console.log(res) console.log(122333) } start() async function pp(e){ return await new Promise((resolve,reject)=>{ resolve(e) }) }