Quick References
      ADO
      ASP
      CSS2
      HTML
      JavaScript
      Jet SQL
      VBScript
      WML
      WMLScript
      WSH
      XHTML
      XML DOM
      XSLT

Features
      Knowledge Base
      Tutorials

Partners
     ZVON.ORG
     XML
     Planet Source Code
     VisualBuilder
     Web Design
     Your HTML Source
     XML/XSLT Forums
     ASPAlliance
     Scripts
     
     Programmers Heaven
     Tek-Tips Forums
     Developer Fusion
     Code Project









OPERATOR:  logical:  &&  ||  !

The logical operators are used to perform Boolean operations.
 
There are three logical operators:
 
 && 
The && is the logical AND operator. This operator performs a Boolean test on two operands. If both operands are true, then a true is returned. If either or both operands is false, false is returned. If the first operand that is tested proves to be invalid, the second operand is not tested, and invalid is returned. Similarly, if the second operand is invalid, invalid is returned.
 
 || 
The || is the logical OR operator. This operator performs a Boolean test on two operands. If either or both operands test true, a true is returned. If both operands test false, a false is returned. If the first operand that is tested proves to be invalid, the second operand is not tested, and invalid is returned. Similarly, if the second operand is invalid, invalid is returned.
 
 ! 
The ! is the logical NOT operator which is used to perform a logical negation on a Boolean (true or false) expression. This operator causes a true expression to become false, and a false expression to become true.
 
Code fragment:
...
var YouAndMe = (IAm && YouAre) || (IAm && !YouAre);
...

 


Copyright 1999-2005 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information