---
meta:
  title: Logical NOT
  description: The logical-not operator checks if a value is falsy. The "!" operator can be thought of saying if "A" is not "B" then execute some code.
---

The logical-not operator checks if a value is falsy. The "!" operator
can be thought of saying if "A" is **not** "B" then execute
some code.

```javascript
const a = false;

// this check if a is false
if (!a) {
  console.log("a is false");
}
```
