22 lines
346 B
Markdown
22 lines
346 B
Markdown
---
|
|
title: Logical not
|
|
type: snippet
|
|
tags: [math,logic]
|
|
unlisted: true
|
|
cover: succulent-7
|
|
dateModified: 2021-01-04T13:04:15+02:00
|
|
---
|
|
|
|
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
|
|
```
|