First page Back Continue Last page Graphics
for Loop
while loop : controls a sequence of repetitions
- for ( init; test; update ) { statements }
- executes statements continuously while test is true
- init : called once to initialize check variable
- update : update the check variable
- init, test, and update must be separated by a semi ;
- works like a while loop with a built in variable to control the looping