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

HTMLJavascriptProgramming Scripts

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>
raja
Published on 26-Feb-2018 14:44:26
Advertisements