function muti(num){
return new Promise((resolve,reject)=>{
setTimeout(()=>{
resolve(num*num)
},1000)
})
var arr =[2,3,4]
// for - of
(async ()=>{
for(let value of arr){
const res = await muti(value)
console.log(res)
}
})
// forEach
arr.forEach(async item=>{
const res = await muti(item)
console.log(res)
})