Skip to content

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: true if the expression evaluates successfully, otherwise false.

Example

Try it out below!
can(var.non_existent_variable)

This function is useful for checking whether an expression is valid before using its value in subsequent operations.