Stop using Array.forEach for everything! “for/of”, USE IT!

Jason Knight
4 min readJun 18, 2020

For some time I’ve been bothered by how people are introducing all sorts of unnecessary headaches in their code with Array.forEach. This has only been exacerbated through anonymous functions, particularly the painfully cryptic and oft outright stupid and pointless “Arrow Functions”. I’m seeing code all the time now where scoping issues, code clarity, and a host of other problems are all…

--

--

Jason Knight

Accessibility and Efficiency Consultant, Web Developer, Musician, and just general pain in the arse