Iterates while the boolean statement is true.