0
Difference between 'and' and 'or'
Does anyone know why 'or' is used for == and 'and' is used for !=? Logically 'or' would mean "either one or the other" which would make more sense if you use it for !=.
4 Answers
0
and takes both of the situations whereas or takes only one in account
0
oh ok
0
I don't understand what you mean by why OR is used for == and AND is used for !=.
They don't have to be used in that combination. == checks if both values are equal, != checks if both values are not equal. In no way do they have to be used with the other Boolean operators such as AND or OR specifically. Hope this clears up your confusion.
0
true and true = true , true and false = false ,
false and false = false { which means the stuff that and splits must be both true }
true or true = true , true or false = true , false or false = false{ which means or needs only one variable to be true } correct me if I'm wrong