I\'m trying to implement XOR in javascript in the following way:
// XOR validation if ((isEmptyString(firstStr) && !isEmptyString(secondStr)) |
You could do this:
Math.abs( isEmptyString(firstStr) - isEmptyString(secondStr) )
The result of that is the result of a XOR operation.