Hi, i am following a JS course. One of the exercices is this:
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
I have learned about OR-AND-NOT so i tried to figure out how to combine those.
After 2 hours making different combinations i still had no solution so i googled it up.
Now i understand how the xor function works but i do not understand how to come to the solution without the google help.
Could someone explain to me how to come to a solution in a logical way, rather than trying all possible combinations untill i get lucky?
Thanks for the help.