Files
30-seconds-of-code/snippets/js/s/nor.md
2023-05-07 16:07:29 +03:00

443 B

title, type, language, tags, unlisted, cover, dateModified
title type language tags unlisted cover dateModified
Logical nor snippet javascript
math
logic
true succulent-8 2021-04-02T16:47:15+03:00

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