Skip to main content
16-Pearl
March 10, 2021
Question

OR Logical Operator in Validator

  • March 10, 2021
  • 1 reply
  • 768 views

When I have the following expression in a validator, I expect the output to be false, based on the OR gate truth table; however, the output is true.  Why is it true?

 

output = (false || false);

 

OR gate truth table

A B A+B
0 0 0
0 1 1
1 0 1
1 1 1

1 reply

16-Pearl
March 10, 2021

Hi @Willie 

 

In the expression of the validator function you can use all the JavaScript comparison operators. Not sure it will work if you use a logical operator.

 

Regards,

Sachin