Your logic isn't quite the same. The original logic does moveNext() at the end of the loop, always. While your logic does it first, before "doing something". The for loop variant guarantees that moveNext() is done for each loop iteration. The while loop variant can be goofed up by other devs adding a continue before doing the moveNext() -- speaking from experience, having had to fix these sorts of problems.....
S
StrataRocha
@StrataRocha