^ is the JS XOR, and it works:
<!DOCTYPE html>
<html>
<body>
<p>This example calls a function which performs a calculation, and returns the result:</p>
<p id="demo"></p>
<script>
function doXOR(a,b) {
var result = a ^ b;
return result;
}
document.getElementById("demo").innerHTML = doXOR(true, true);
document.getElementById("demo").innerHTML += doXOR(true, false);
document.getElementById("demo").innerHTML += doXOR(false, false);
document.getElementById("demo").innerHTML += doXOR(false, true);
</script>
</body>
</html>
It gives 0101 when executed for me...I'd check your code is executing.