if Function |
To calculate a value depending on a condition, use the if function.
Depending on the evaluation of the first argument, either the second or the third argument is evaluated and it's value is returned.
Syntax:
if(condition, true case, false case)