Q:

Write a JavaScript program to create the value of NOR of two given booleans

0

Write a JavaScript program to create the value of NOR of two given booleans.

Note: In boolean logic, logical nor or joint denial is a truth-functional operator which produces a result that is the negation of logical or. That is, a sentence of the form (p NOR q) is true precisely when neither p nor q is true - i.e. when both of p and q are false
Sample Example:
For x = true and y = false, the output should be logical_Nor(x, y) = false; For x = false and y = false, the output should be logical_Nor(x, y) = true.

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

function test_logical_Nor(a, b) {
  return (!a && !b)
}
console.log(test_logical_Nor(true, false));
console.log(test_logical_Nor(false, false));
console.log(test_logical_Nor(true, true));

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Similar questions


need a help?


find thousands of online teachers now