DEV Community

Discussion on: Optimized way to iterate over the length in js loop?

Collapse
 
warriorofsunlight profile image
WarriorOfSunlight

On the topic of array iteration and array functions, I would highly recommend that you take a minute to really look through the array prototype methods: developer.mozilla.org/en-US/docs/W...

There are several you may never end up using but having high level knowledge of the common ones (namely, forEach, map, filter, and reduce) is always useful. As Ryan has stated, the optimizations you're looking to make will save you a minimal amount of fetch/processing time at best.