Looping Constructs
- Looping statements use logical expressions to determine how many times
to repeat a section of code.
- Use a for loop
when you want to repeat the code a certain number of times.
- Use a while
when you want to repeat the code until a particular condition changes.
- We will not cover do/while
loops, so if you use them, you are on your own!