DEV Community 👩‍💻👨‍💻

Discussion on: Iterating over objects and arrays: frequent errors

rrackiewicz profile image

Hi Vicky. Nice read. I would highly recommend making the shift to functional programming to iterate over collections. I really got excited about functional programming when I began doing code challenges on When I would submit my answers (written in my old clunky imperative style) I would always see how other solved the same problem. The most simple and elegant answers were ALWAYS written declaratively and I was jealous! So I embraced foreach (now for of in ES6), map, filter, reduce, and all other manners of functional programming and I'm happy with how simple my coding has become.