NokiaTube | New address | Mode Phone | On high quality
InitfinityTM
Initfinity / Docs / Nodes / Logic

Logic node

Combines true and false values with AND, OR, NOT, XOR and friends.

What it does

Combines A and B with the chosen Operator (AND, OR, NOT, NAND, NOR, XOR or XNOR) and outputs a boolean on Result. NOT uses only A and ignores B.

Notes

  • Inputs are converted to true or false the way JavaScript does: 0, empty text, null and a missing input are false; everything else is true.
  • The text "false" is not empty, so it counts as true. Compare against it first if you receive that from a request.
  • Result is a value. To branch on it, wire it into a Condition node.

Example

True only when both inputs are true:

#fdl 1
flow "Both must be true"
a(toggle)
b(toggle)
both(logical) operator="and"
answer(text)

a.out -> both.a
b.out -> both.b
both.result -> answer.in

Flip the toggles on the canvas to see the result change.

Related nodes

Condition · Comparison · Gate

Open Initfinity