Files
30-seconds-of-code/snippets/nor.md
Isabelle Viktoria Maciohsek 8bf67754ce Make expertise a field
2022-03-01 20:21:45 +02:00

443 B

title, tags, expertise, unlisted, firstSeen, lastUpdated
title tags expertise unlisted firstSeen lastUpdated
Logical nor math,logic beginner true 2021-03-29T21:20:41+03:00 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