3 ms·
I find map/filter/reduce much easier to read if it is being used for a functional map, filter, or reduce operation or something not too distant from it. > A st
by dragonwriter 5y ago
I find map/filter/reduce much easier to read if it is being used for a functional map, filter, or reduce operation or something not too distant from it.
> A straight for loop is infinitely better in every way.
A straight for, for-of, or for-in loop, as appropriate, is finitely better for imperative operations that don't naturally fit map/filter/reduce but need to be performed over some set of values.