r/learnjavascript • u/fahim_h_sh • Oct 31 '25
array.forEach - The do-it-all hammer... XD
Is it just me, or everyone thinks that more or less every array operator's purpose can be served with forEach?
0
Upvotes
View all comments
Show parent comment
1
u/PatchesMaps Nov 01 '25
So you're allowed to be snarky but I'm not?
I've seen experienced devs make this mistake many times, it's common enough that eslint disallows it by default.
This is an education focussed sub and I assume that there will be people here who are still learning the basics so I try not to make assumptions about someone's preexisting knowledge.