function print(arr){
let res=[]
arr.forEach(item=>{
res.push(new Promise(function(resolve,reject){
resolve(item)
}))
})
Promise.all(res).then((resList)=>{
resList.forEach(item=>{
console.log(item)
})
})
}
print(['http://aa.com','http://bb.com'])
function print(arr){
let res=[]
arr.forEach(item=>{
res.push(new Promise(function(resolve,reject){
resolve(item)
}))
})
Promise.all(res).then((resList)=>{
resList.forEach(item=>{
console.log(item)
})
})
}
print(['http://aa.com','http://bb.com'])