Computer >> Computer tutorials >  >> Programming >> Javascript

What is JavaScript Bitwise Left Shift(<<) Operator?


Using Bitwise Left Shift operator, shift one or more zero bits from the right. The leftmost bit isn’t considered.

Example

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

<!DOCTYPE html>
<html>
   <body>
      <script>
         document.write("Bitwise Left Shift Operator<br>");

         // 7 = 00000000000000000000000000000111
         document.write(7<<1);
      </script>
   </body>
</html>