Calling
Execute a sequence of instructions depending on the value of a JavaScript condition.
The cond statement expects an array of conditions. Each condition is an object with a when and a then property, with the
exception of a single, optional condition with just an else property.
when-then conditionsThe JavaScript condition to act on
Sequence of SWML Methods to execute when the condition evaluates to true
else conditionSequence of SWML Methods to execute when none of the other conditions evaluate to true
The JavaScript condition string already has access to all the document variables. Using the variable
substitution operator (${var}) inside this string might result in inconsistent behavior.