Code Blocks

Blocks are also known as compound statements. Often, a block is used as the body of an if statement or a loop statement, to group statements together.

You can declare variables inside a block; such variables are NOT local to that block. Local variables live as long as the function execution ends.

Last updated