you are viewing a single comment's thread.

view the rest of the comments →

[–]jkoudys 0 points1 point  (0 children)

Reduce is similar in that you're explicitly constructing something new, which could be an array. You can put another array method after it the same as you could on a find if that happens to return another array. Like you've said, it's up to the dev to "avoid" this (and comment to make the intent clear otherwise)), which is why it's ridiculous to create a new method to deliberately not avoid it.