|= (Bitwise OR Assignment) : Bitwise Operator : Operators JAVASCRIPT TUTORIALS


JAVASCRIPT TUTORIALS » Operators » Bitwise Operator »

 

|= (Bitwise OR Assignment)

















<html>
    <script language="JavaScript">
    <!--
    // 2 = 00000000000000000000000000000011
    // 5 = 00000000000000000000000000000101
    // 7 = 00000000000000000000000000000111

    x = 2;
    x |= 5;
    document.write("x = ",x);
    -->

    </script>
</html>







HTML code for linking to this page:

Follow Navioo On Twitter

JAVASCRIPT TUTORIALS

 Navioo Operators
» Bitwise Operator