Files
30-seconds-of-code/snippets/nor.md
Angelos Chalaris a7e286f440 Update nor.md
2021-04-02 16:47:15 +03:00

348 B

title, tags, unlisted
title tags unlisted
nor math,logic,beginner true

Checks if none of the arguments are true.

  • Use the logical not (!) operator to return the inverse of the logical or (||) of the two given values.
const nor = (a, b) => !(a||b);
nor(true, true); // false
nor(true, false); // false
nor(false, false); // true