Preview:
var x=23;y=13
console.log(  x ^=y);

var x=23;y=13
console.log(  x |=y);
/*this returns 31. this is because the binary value of 23 is 10111 and binary value of 13 is 1101. the OR operation between them gives 11111. which is 31 in decimal. */
downloadDownload PNG downloadDownload JPEG downloadDownload SVG

Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!

Click to optimize width for Twitter