Scripting reference · Nerdamer Language

and

Returns 1 when every argument is true, and 0 otherwise.

Arguments are checked left to right, and checking stops at the first false one, so later arguments aren't evaluated.

Scripting

and(a, b, ...)

Write it in a script: nerdamer('and(1,2,3)'), or in the Playground.

Parameters

a, b, ...
Two or more conditions or values.

Examples

Every argument is nonzero.

and(1,2,3)
// → 1
Open in Playground

One argument is zero.

and(1,0,3)
// → 0
Open in Playground

Stops at the first false argument, so 1/0 never runs.

and(0, 1/0)
// → 0
Open in Playground

Good to know

  • A value is true when it isn't zero. An unknown symbol counts as true; a comparison that can't be decided, such as x>0 for an unknown x, counts as false.

← Back to Nerdamer Scripting