DEV Community

Discussion on: Don’t pay the for-loop tax

Collapse
 
kspeakman profile image
Kasey Speakman

I could not agree more with this article. A map, filter, or reduce tells me what is going on without looking too deeply at the code. A for loop requires a careful eye to make sure you don't miss a side effect when you refactor something. The performance difference for most cases hardly compares to the maintenance benefits.