What is JavaScript Bitwise Right Shift(>>) Operator?n



Using Bitwise Right Shift operator, shift bit from the left. The rightmost bit isn’t considered.

Example

You can try to run the following code to learn how to work with JavaScript Bitwise Right Shift Operator.

<!DOCTYPE html>
<html>
   <body>
      <script>
         document.write("Bitwise Right Shift Operator<br>");
         document.write(-7>>1);
      </script>
   </body>
</html>

Advertisements