I'm mostly self taught (with Associates Degree), and continue to learn. I have 25 years of experience in both hardware and software, with my focus on software in the past 15 years.
Please look further down the comments for a comment by Jan Hasebos. It would address your perception regarding the iterated declaration, while also respecting the variable scope of the for loop.
Really, you'd be better off saying the "bad" example is ok, while you feel the "good" example is better.
I added some thoughts below Jan to expand on this.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Please look further down the comments for a comment by Jan Hasebos. It would address your perception regarding the iterated declaration, while also respecting the variable scope of the for loop.
Really, you'd be better off saying the "bad" example is ok, while you feel the "good" example is better.
I added some thoughts below Jan to expand on this.