DEV Community

Discussion on: Practical Ways to Write Better JavaScript

Collapse
 
harveyramer profile image
Harvey Ramer • Edited

I've been around a while, so I'm comfortable with the for-loop. I often use other tools, but there are times a for-loop fits the task.

I was not aware that they are highly inefficient constructs that prevent parallel tasks from executing. I'd assumed that other methods for iteration like map or forEach were convenience methods that looped over records under the hood using a for-loop. Apparently not so. I need to do some more research.