Skip to content

not() function

返回其参数的 !。当传递假值时返回 true,传递真值时返回 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.