Skip to content

not() function

引数の!を返します。falsy 値が渡された場合はtrueを返し、truthy 値が渡された場合はfalseを返します。

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.