3 ms·
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 subt
by brundolf 5y ago
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)