jamesadrian Posted April 13, 2016 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 Link to comment Share on other sites More sharing options...
Ingolme Posted April 13, 2016 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. Link to comment Share on other sites More sharing options...
jamesadrian Posted April 13, 2016 Author 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 Link to comment Share on other sites More sharing options...
Ingolme Posted April 14, 2016 Share Posted April 14, 2016 It is not 100% complete. I usually check the MDN (Mozilla Developer Network) for more detailed information. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now