📜  循环异步 javascript 代码示例

📅  最后修改于: 2022-03-11 15:03:15.148000             🧑  作者: Mango

代码示例2
const mapLoop = async _ => {
  console.log('Start')

  const numFruits = await fruitsToGet.map(async fruit => {
    const numFruit = await getNumFruit(fruit)
    return numFruit
  })

  console.log(numFruits)

  console.log('End')
}