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.
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.
It's still a micro optimization. The for loop can loop through 400 empty places in an array in what, 5ms? It's extremely fast.
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.