I\'m trying to implement XOR in javascript in the following way:
// XOR validation if ((isEmptyString(firstStr) && !isEmptyString(secondStr)) |
Try this: function xor(x,y) var result = x || y if (x === y) { result = false } return result }
function xor(x,y) var result = x || y if (x === y) { result = false } return result }