not

not x

not(x)

Try it yourself:

See also:

Invert a Boolean condition with not

not(x) returns the logical opposite of x. It converts true to false and false to true, making exclusion conditions clear in formulas and filters.

Examples

Use not to retain values that do not meet a condition, often alongside filter. Combine it with and and or to build compound decisions. unequal is often clearer than negating an equality test.

Caveats

Be deliberate about truthiness and precedence: put compound conditions in parentheses before negating. Not is for logical values, not numeric complement; use unaryMinus to negate a number. Validate mixed user input with typeOf.

All functions