While loop equivalent to a for loop.