What is Logical NOT Operator (!) in JavaScript?

JavascriptWeb DevelopmentFront End Technology

The Logical NOT Operator reverses the logical state of its operand. If a condition is true, then the logical NOT operator will make it false.

<html>
   <body>
      <script>
         var a =true;
         document.write("a = ");
         document.write(a);
         result =!a;
         document.write("<br>!a = ");
         document.write(result);
      </script>
   </body>
</html>
raja
Published on 19-Jan-2018 05:18:22
Advertisements