News for hackers. Stuff that matters.
Re:FP techniques that will help you write better JavaScript by brundolf on Friday February 11, 2022 @02:20AM (#30298114)
Classic for-loops create state and ask you to manually manage control-flow using an arbitrary conditional expression. They open the door for a whole lot of subtle mistakes that for..of can protect you from in the cases where it applies (which in my experience, are 95% of the cases where you’d use a for loop at all)

There are no comments on this comment yet.