DEV Community

Discussion on: for of, for in or forEach?

emma profile image
Emma Goto 🍙

I personally use forEach loops wherever possible. The only time I will need to use a for loop will be if I need to break out of a loop early (e.g. I'm looping through until I find a specific element, and then stopping).