Add logical not

This commit is contained in:
Angelos Chalaris
2020-05-13 11:28:26 +03:00
parent 736877ba61
commit b71ef81a4a

17
snippets/not.md Normal file
View File

@ -0,0 +1,17 @@
---
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
```