I thought while loops were different, because I can declare something immediately prior to the while loop, and access that data from within the while loop without needing to pass a value or reference.
Variable declaration outside also work with for and do loops. It is not constrain to while.
I thought while loops were different, because I can declare something immediately prior to the while loop, and access that data from within the while loop without needing to pass a value or reference.
Variable declaration outside also work with for and do loops. It is not constrain to while.