JavaScript array .reduce with async/await
Seem to be having some issues incorporating async/await with .reduce(), like so: 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) The data object is logged before the this.store completes... I know you can utilise Promise.all with async loops, but does that apply to .reduce() ? Bergi The problem is that your