Indenting code refers to adding spaces or tabs at the beginning of each line within a block of code, typically done with nested structures like loops or conditional statements. It improves readability by visually showing which lines belong to which block.
Related terms
code block: A group of related lines of code enclosed within a pair of curly braces {}. Code blocks are used to define the scope of variables and to determine which lines of code should be executed in response to certain conditions.
whitespace: Whitespace refers to any space, tab, or line break character in code that does not affect the functionality but improves its readability. Indenting is one form of whitespace usage.
style guide: A style guide is a set of rules or recommendations for writing code in a specific programming language. It often includes guidelines on how to format and indent code for consistency and readability.