The For Statement

The 'for' loop is more compact than the 'while' and 'do' loops and automatically updates the loop counter at the end of each iteration. Both 'for' and 'while' loops are designed for different situations. You'll learn more about when to use each later.

15. End of Chapter



End of Chapter

The phrase for( ; ; ) is the same as while( true ). Sometimes people do this, although it is not very clear and should be avoided.

That's all for this chapter. Look at the following topics for a while. Click on a subject for more information.