javascript xor

if there an xor symbol?
i have an if statement right now like:

if(someBool || someBool2)

but it would work better if i could do:

if(someBool “xor” someBool2)

2 Answers

2

oh, nvm. i got it figured out.

if(someBool != someBool2)

acts like an xor. so im just going to use that.

You could always do

if( (a || b) && !(a && b))