有大佬可以解释下什么叫异步可迭代对象吗
javascript吧
全部回复
仅看楼主
level 2
会有尽头吧▫
楼主
constlocFileList=awaitfs.opendirSync(locPath)
forawait(constdirentoflocFileList)
console.log(dirent.name);
就这段代码迭代的时候必须加上await才能打印出数据
2021年09月04日 07点09分
1
level 2
会有尽头吧▫
楼主
constlocFileList=awaitfs.opendirSync(locPath)
forawait(constdirentoflocFileList)
console.log(dirent.name);
2021年09月04日 07点09分
2
level 2
会有尽头吧▫
楼主
发出来 const和变量名挨在一起了
2021年09月04日 07点09分
3
1