Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Unsigned Right Shift Operator in JavaScript



This operator is just like the >>operator, except that the bits shifted in on the left are always zero i.e. xeroes are filled in from the left.

Example

You can try to run the following code to learn how to work with unsigned right shift operator −

<html>
   <body>
      <script>
         var a =-14;
         var b =2; // Shift right two bits

         document.write("(a >>> b) => ");
         result =(a >>> b);
         document.write(result);
      </script>
   </body>
</html>
Updated on: 2020-06-13T07:41:03+05:30

493 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements