Skip to main content



IfChain Function

The IfChain function returns the return value from the first true condition in a list.

Syntax

IfChain(condition1, returnValue1, condition2, returnValue2, ..., defaultReturn)

The IfChain function returns the return value from the first true condition in a list.

Arguments

condition Boolean

returnValue Any

defaultReturn Any - The default return value, if none of the test conditions is true.

Remarks

Example:

IfChain(a=1, "One", a=2, "Two", a=3, "Three", "Enter 1,2,or3"); // returns "Two"