Section 5.2

for Loop

Summary

  • What is a for loop and how does it work?
  • What's the difference between while and for loops?
  • When to use a for loop.
  • When to use a while loop.

What is a for loop and how does it work?

What's the difference between while and for loops?

When to use a for loop.

When to use a while loop.

Resources