DEV Community

loading...

Discussion on: Cleaning Up Your Code: Good Names

coolgoose profile image
Alexandru Bucur

Of course, for loops by definition point to an 'index' (hence the initial i), and that index is going to be called on a clear named variable.

Thread Thread
aleksikauppila profile image
Aleksi Kauppila

Yes, "traditional" for-loops work that way... My opinion stems from mainly using languages that have an iterator-based for-loop where the "i" is not the index, but an item.

Forem Open with the Forem app