DEV Community

Discussion on: Which types of loops are most popular in the programming languages you use?

Collapse
 
kayis profile image
K

In JavaScript I only use loops in special cases.

Normally, I use filter/map/reduce.

When I have an array of promises I use a for-of-loop with await.

When I see perf problems I use plain for-loops.