Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

xor in javascript

const a = 5;        // 00000000000000000000000000000101
const b = 3;        // 00000000000000000000000000000011
// xor operator ^
console.log(a ^ b); // 00000000000000000000000000000110
// expected output: 6
 
PREVIOUS NEXT
Tagged: #xor #javascript
ADD COMMENT
Topic
Name
7+6 =