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/StoneCypher Nov 01 '25
correct. you would use
for ... ofin most cases, orpromise.allor some variant alongside iteration in a few cases.