Using Bitwise Exclusive OR Plus Assignment Operator : Bitwise Operator : Operators JAVASCRIPT TUTORIALS


JAVASCRIPT TUTORIALS » Operators » Bitwise Operator »

 

Using Bitwise Exclusive OR Plus Assignment Operator

















<html>
    <script language="JavaScript">
    <!--
    // integer = 32-bit binary representation
    // 10 = 00000000000000000000000000001010
    //  6 = 00000000000000000000000000000110
    // 12 = 00000000000000000000000000001100
    x = 10;
    x ^= 6;
    document.write("x = ",x);
    -->
    </script>
</html>







HTML code for linking to this page:

Follow Navioo On Twitter

JAVASCRIPT TUTORIALS

 Navioo Operators
» Bitwise Operator