Before anyone would be inclinded to use reduce for everything, since it indeed can be used to do all the things that mapand filter(as well as someand any), keep in mind that the same could be said (and then some) about a traditional for loop.
As to using reduce when you want to combine different operations, again note that the same would be true for a forloop. Neither a for loop nor reduceshould be used in those cases, for the very same reason: you sacrifice legilibity (and the next developer that has to modify your code won't be thanking you for your cleverness).
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Before anyone would be inclinded to use
reduce
for everything, since it indeed can be used to do all the things thatmap
andfilter
(as well assome
andany
), keep in mind that the same could be said (and then some) about a traditionalfor
loop.As to using reduce when you want to combine different operations, again note that the same would be true for a
for
loop. Neither afor
loop norreduce
should be used in those cases, for the very same reason: you sacrifice legilibity (and the next developer that has to modify your code won't be thanking you for your cleverness).