JSOperators

!

Logical NOT

See more on MDN

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.

const a = false;

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