Scripting reference · Nerdamer Language
if
Evaluates one branch based on a Nerdamer Scripting condition.
The condition is evaluated first. Only the selected branch is evaluated, so errors or assignments in the unselected branch do not run.
The false branch is optional.
Examples
These examples use Nerdamer Scripting.
Evaluate only the true branch.
if(1,5,6) // → 5
Evaluate only the false branch.
if(0,5,6) // → 6
Interfaces
The same operation is available through the interfaces below.
Nerdamer Scripting
Use this form in Nerdamer Scripting input passed to nerdamer(...).
if(condition, whenTrue[, whenFalse])
Parameters
condition— Condition evaluated by the Nerdamer Language runtime.whenTrue— Expression evaluated when the condition is true.whenFalse— Optional expression evaluated when the condition is false.
