On this page

Guards

The guard keyword is used to prevent excessive nesting in functions. It acts like an early return for the function, wrapping the following lines in an if statement.

Usage

guard ([condition]) [value];

Example

See also