Closed DevilRoshan closed 4 years ago
出自小程序前端面试星球
map和for中调用异步函数的区别,即
map
for
// map [1, 2, 3].map(async v => { // do something await asyncFunc(v) // do something }) // for for(let i = 0; i < 3; i++){ // do something await asyncFunc(i) // do something }
https://github.com/DevilRoshan/Question/blob/master/20200914-js-promise.md
map
和for
中调用异步函数的区别,即