"Exclusive or" Operator

suggest change

The operator for an “exclusive or” (for short XOR) is: ^

This operator returns true when one, but only one, of the supplied bools are true.

true ^ false   // Returns true
false ^ true   // Returns true
false ^ false  // Returns false
true ^ true    // Returns false

Feedback about page:

Optional: your email if you want me to get back to you:

Table Of Contents