Scripting reference · Nerdamer Language

xor

Returns 1 when an odd number of arguments are nonzero.

xor evaluates all arguments using Nerdamer Scripting truthiness and toggles the result for each true value.

Examples

These examples use Nerdamer Scripting.

Three true arguments have odd parity.

xor(1,1,1)
// → 1

Two true arguments have even parity.

xor(1,1)
// → 0

Interfaces

The same operation is available through the interfaces below.

Nerdamer Scripting

Nerdamer Scripting

Use this form in Nerdamer Scripting input passed to nerdamer(...).

xor(arg1, arg2, ...)

← Back to Nerdamer Scripting