Skip to main content

$nand

The $nand operator evaluates multiple expressions and returns false if all of them are truthy, otherwise it returns true. It’s the negation of the $and operator.

Input

  • An array of expressions to evaluate
  • Each expression is evaluated in order from left to right

Output

  • false if all expressions evaluate to truthy values
  • true if any expression evaluates to a falsy value

Examples

All Truthy Values

Result: false

With Falsy Value

Result: true

Multiple Expressions

Result: false if the age is greater than or equal to 18 AND the status is “active”, otherwise true