What is unsigned Right Shift Operator (>>>) in JavaScript?

JavascriptWeb DevelopmentFront End Technology

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>
raja
Published on 19-Jan-2018 05:33:26
Advertisements