Files
30-seconds-of-code/snippets/nor.md
Dharmesh Singh aa5a00b516 added nor snippet
2021-03-29 23:50:41 +05:30

367 B

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

Returns the logical nor of the given two values.

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