DEV Community

Discussion on: Which Array Function When?

Collapse
 
22samuelk profile image
Samuel

That = in += is redundant since the reducer only needs to return the new value, not change the old one. I mean, it'll still work, because the correct value is returned, but there's no need in changing the passed-in accumulator.