if
Purpose
The if() function performs a logical test on the condition and calls the first argument if the condition evaluates to true or the second argument if the condition evaluates to false.
Arguments
The function requires exactly 3 arguments.
-
"codition" is the condition to evaluate. It must be a boolean expression that returns true or false.
-
"argument_1" is the formatting function to apply if the "condition" evaluates to true.
-
"argument_2" is the formatting function to apply if the "condition" evaluates to false. The second and third arguments must be of the same data type.
The second or third arguments may be other functions to be evaluated, the arguments do not have to be values.