The point is to illustrate how this would work without applying functional programming to everything in order to build some understanding using familiar constructs.
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.
Instead of looping we could use find too right ? We really don't like to use for/while etc unless we have to
We could, but for someone who is not familiar with functional programming it's a little strange. We could also do this:
The point is to illustrate how this would work without applying functional programming to everything in order to build some understanding using familiar constructs.