JavaScript数组.reduce与async / await
似乎在将async / await与.reduce()合并时遇到一些问题,如下所示: const data = await bodies.reduce(async(accum, current, index) => { const methodName = methods[index] const method = this[methodName] if (methodName == 'foo') { current.cover = await this.store(current.cover, id) console.log(current) return { ...accum, ...current } } return { ...accum, ...method(current.data) } }, {}) console.log(data) 在完成之前data记录该对象。this.store 我知道您可以利用Promise.all异步循环,但这是否适用于.reduce()?