Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
guilherme-puida
· 3y ago · 0 comments
Sure, but `forEach` is not even in the same category as map/filter/reduce. `forEach` is in no way functional.
Comments
[–]
nullcipher
3y ago
I mean just search for "is forEach functional programming"
[–]
guilherme-puida
OP
3y ago
forEach is just an alternate syntax for a for..in loop, that instead of being a block it takes a closure. It's not functional, since it's only used for side-effects.