how to write xor function using and ,or , not operators?

Write a function Xor that takes two Boolean values. If both values are different, the result should be true. If both values are the same, the result should be false.

this is the answer for anyone who get’s into this problem in future!!! you’re welcome this code works so i think of sharing it for others who face the problem

here is the code!

function write(A,B){
VAR x = !((!a||b)&&(a||!b))
return x
}