Skip to content

not() function

Returns the ! of its argument. It will return true when passed falsy value, and false when passed a truth value.

Signature:

typescript
declare function not(a: unknown): boolean;

Example

ts
not(true); // false
not(1); // false
not(NaN); // true

Try It

Open Source Code

Released under the Apache-2.0 License.