Carrot reference
Operators

if

A logic operator used to return a defined expression based on the truthiness of one or more other expressions.

Syntax

expressionOne if expressionTwo

  • expressionOne will be evaluated and returned if expressionTwo is evaluated to be truthy.

Sample usage

base if directs > 0 returns base if directs is greater than 0.

See also



Updated 19 Dec 2023
Doc contributor
Did this page help you?