Files
30-seconds-of-code/snippets/not.md
Angelos Chalaris b71ef81a4a Add logical not
2020-05-13 11:28:26 +03:00

18 lines
255 B
Markdown

---
title: not
tags: math,logic,beginner
---
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
```