19 lines
272 B
Markdown
19 lines
272 B
Markdown
---
|
|
title: not
|
|
tags: math,logic,beginner
|
|
unlisted: true
|
|
---
|
|
|
|
Returns the logical inverse of the given value.
|
|
|
|
- Use the logical not (`!`) operator to return the inverse of the given value.
|
|
|
|
```js
|
|
const not = a => !a;
|
|
```
|
|
|
|
```js
|
|
not(true); // false
|
|
not(false); // true
|
|
```
|