ExCellerate.Functions.General.If (excellerate v0.4.0)

Copy Markdown View Source

Returns one value if a condition is true and another if it is false.

When called with two arguments, returns null when the condition is false. With three arguments, returns the third argument as the else value.

Examples

if(true, 'yes', 'no')        'yes'
if(false, 'yes', 'no')       'no'
if(score > 90, 'A', 'B')     'A' (when score is 95)
if(active, 'on')             'on' (when active is true)
if(false, 'on')              null