bakedoatmeal / js-data-challenges

MIT License
0 stars 0 forks source link

Could you use Reduce here? #5

Open soggybag opened 2 years ago

soggybag commented 2 years ago

https://github.com/bakedoatmeal/js-data-challenges/blob/518c2cfba8e312147419dd3dee8bcd631a907d66/challenges-2.js#L77

Would it possible to use reducer here?

bakedoatmeal commented 2 years ago

Done! It's cool using reduce to return an array or object, previously I had only used it to calculate single values