Files
30-seconds-of-code/snippets/not.md
Isabelle Viktoria Maciohsek 27c168ce55 Bake date into snippets
2021-06-13 13:55:00 +03:00

21 lines
348 B
Markdown

---
title: not
tags: math,logic,beginner
unlisted: true
firstSeen: 2020-05-13T11:28:26+03:00
lastUpdated: 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
```