jamesadrian 0 Posted April 13, 2016 Report Share Posted April 13, 2016 I am about to put a full effort into learning javascript, but there are certain features I cannot live without. One of them isthe XOR operation. I have read some comments about it online and I have looked for it int eh W3Schoold tutorial. I understand that ^ is the operator, but I am confused about how it works. If I have two byte values A and B, will C be what I expect? A ^ B = C Thank you for your help. Jim Adrian Quote Link to post Share on other sites
Ingolme 1,020 Posted April 13, 2016 Report Share Posted April 13, 2016 It does an XOR operation on the bits of A and B, they must be integers. If they aren't they'll be casted to integer. Quote Link to post Share on other sites
jamesadrian 0 Posted April 13, 2016 Author Report Share Posted April 13, 2016 Foxy Mod, Thank you for this answer. It is strange that I could not find the answer in the W3Schools java script tutorial. Jim Adrian Quote Link to post Share on other sites
Ingolme 1,020 Posted April 14, 2016 Report Share Posted April 14, 2016 It is not 100% complete. I usually check the MDN (Mozilla Developer Network) for more detailed information. Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.