Every loop you've written so far has had three parts:
A for loop puts all three parts on a single line, separated by semicolons:
for (initialization; condition; update)
This makes loops more compact and easier to read at a glance. The code sample shows a for loop that counts from 1 to 5. Run it step by step to see how it works.
No variables
Output (Console)