The example with the promises, if I read it correctly, is basically using reduce as an alternative way to do a for loop.
One of the easiest ways to tell that it’s a misuse of reduce is that the result is not being assigned to anything.
The times I use reduce are simple. I want to “reduce” a collection of some sort to a single value, without any side effects. It’s additionally beneficial if the action being performed can be encapsulated in a function, so I can simply pass the function in, instead of code. However, this isn’t necessary.
JS doesn’t enforce it, but the code my team and I write requires that reduce has no side effects (we enforce through code review).
The point is that when I come across reduce in our team’s code, the intention is communicated to me immediately. A collection of some sort was converted to a single value, and there were no side effects.
That won’t be my expectation if it’s a for loop, or a forEach, or a while.
If those conditions are not met for a reduce, then it’s a bug in the code, as far as my team is concerned.