Nested Statements

Nested statements are structures placed inside other structures, such as an IF inside a loop. You will learn when nesting is useful, and how to keep deeply nested code readable.

Key terms

Nested statement
A selection or iteration statement placed inside another one.
Readability
How easy code is to read. Too much nesting makes it harder to follow.
Modular code
Splitting code into subroutines, which helps reduce deep nesting.

Part of Programming.