Everything done with a for loop can be done with a while loop, BUT not all while loops can be implemented with a for loop. Remember, Everything done with a for loop can be done with a while loop, BUT not all while loops can be implemented with a for loop. WHILE : While-loops are used when the exiting condition has nothing to do with the number of loops or a control variable.