Can
The can function evaluates an expression and returns a boolean indicating whether the evaluation is successful.
Syntax
can(<expression>)Parameters
expression: The expression to evaluate.
Returns
- Boolean:
trueif the expression evaluates successfully, otherwisefalse.
Example
can(var.non_existent_variable)This function is useful for checking whether an expression is valid before using its value in subsequent operations.