DEV Community

Discussion on: Why is using javascript “for loop” for array iteration a bad idea?

 
jonrandy profile image
Jon Randy 🎖️

Precisely - and by addressing the symptom rather than the cause i.e. by switching from a 'for loop' to forEach - you would actually be making the performance of the optimal (bug fixed) system worse than before.