Glossary: Refactoring and Clean Code
Guard clause
Also written: guard clauses
An `if` at the top of a function that handles a special case and returns at once. It flattens deep nesting, as in `shipping_cost`.
Glossary: Refactoring and Clean Code
Also written: guard clauses
An `if` at the top of a function that handles a special case and returns at once. It flattens deep nesting, as in `shipping_cost`.