Thanks to visit codestin.com
Credit goes to www.tutorialspoint.com

JavaScript Bitwise NOT Operator



The Bitwise NOT (~) Operator performs NOT operation on the bits. You can try to run the following code to learn how to work with JavaScript Bitwise NOT Operator.

Example

<!DOCTYPE html>
<html>
   <body>
      <script>
         document.write("Bitwise NOT Operator<br>");
         // 7 = 00000000000000000000000000000111
         document.write(~7);
      </script>
   </body>
</html>
Updated on: 2020-05-20T09:36:34+05:30

225 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements