I’ve just searched “reduce” on Unsplash and this was the first result, philosophical! Photo by Noah Buscher

In defense of reduce()

Reduce has been getting a lot of “hate” recently: let’s spread some love!

I’ve seen a lot of debate in the JavaScript community lately. It’s strange ’cause it never happens!

The dish of the week seems to be Array.prototype.reduce(). Is it useful? Is it worse than loops? Is it readable? This is a recurring topic which has been brought up multiple…

--

--

--

Angular GDE, Founder of accademia.dev

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Build a Serverless Comment System for a Jamstack Blog | Dev Extent

Lightweight Skeleton Loading States for your JavaScript Data Visualizations

Web Dev Streaks Day - 8 (Milestone 2: Responsive Web Layout)

Stripe Recurring Payments with Angular 10 (Subscription Based payment)

5 React Native Libraries You Might Have Missed

String startsWith() Method in JavaScript

Return Early, Return Often

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Michele Stieven

Michele Stieven

Angular GDE, Founder of accademia.dev

More from Medium

Using async/await in a forEach loop (you can’t)

Why you should leverage functional programming in JS

Use map() instead of for() loops

Typescript Quick Introduction