Comment by hawski

4 years ago

I find that many times in more complex loops you need the index as well. Sometimes for as mundane reason as logging.

Yes, my code is not that complicated and I use languages that are rather high level (Python, Golang, JS with Vue) so I needed the index I think once when I had to remove an element from an array in JS and for some reason I was not using lodash.

But yes, there are of course cases where the index could be needed, I was merely commenting on the aversion part for generic developers.