XOR in Featurescript?
EvanReese
Member, Mentor Posts: 3,086 PRO
Is there a XOR operator like the OR operator? I'm looking for the best way to take a collection of booleans and return "false" if any of them are false, instead of only doing so if ALL of them are false.
For example, with OR it looks like
For example, with OR it looks like
false || true || false = true;but I'm trying to avoid doing this because it feels funny
false || !true || !false) = false;!(!What is The Right And Good Way to do this?
0
Answers
-
I'm looking for the best way to take a collection of booleans and return "false" if any of them are false
A && B && C...
Is there a XOR operator?A != B
2 -
I must have not been thinking clearly, because this seems obvious now, haha. Thanks, Kevin!0

