-
-
Notifications
You must be signed in to change notification settings - Fork 420
Closed
Labels
Description
I still think
foo.reduce((total, element) => total + element.bar, 0);should be preferred over
let total = 0;
for (const element of foo) {
total += element.bar;
}Especially, where reduce is not an expression, like this case
if (foo.reduce((total, element) => total + element.bar, 0) > 100) {};Or at least allow to ignore it.
papbfregante and jonahsnider