H I O X INDIA
Javascript Tutorial
Google
Web hscripts.com
 HOME  ||  Scripts  ||  Purchase  ||  Tutorials  ||  Images  ||  Tools  ||  Directories 
  :-)  Send Page   :-)   Feedback   :-)   Register   :-)   Links   :-)   Support   :-)   Bookmarks :-)  
 Forums   Hosting   Internet Stats   Easy Calculation   FUN Games 

Java-Script Tutorial
Introduction
Variables
Operators
Statements
Loops
Functions
Objects
Arrays
Browser Objects
Form DOM
Ask Your Doubts
Feedback





Logical Operator Conditions


Topic

Logical operator conditions and syntax that can be used in javascript?



Explanation

Logical Operators: There are used mainly for boolean operations.
Operator Syntax Description
&& Used for logical "and" operation, condition
|| Used for logical "or" operation, condition
| Used for logical "not" operation, condition

Local operators or used along with if statements and while loops to check multiple criterias.
example usage1: if a is animal && (and) b is man, print something.
example usage2: if a is tany || (or) a is ramani, say good morning.

Example Code:
<script language="javascript">
var a = "tany";
var b = "ramani";
if(a == "tany" && b == "ramani")
{
document.write(" Logical Operator AND '&&', OR '||', NOT '|' ");
}
</script>


Result:



        Javascript (JS) is one of the most used languages in the world. Some times spelled as Java Script. Hope you enjoy this tutorial. Do send your feedback or suggestions on this javascript or java script tutorial. This is a copyright content.

others

privacy policy     license     sitemap
© 2004-2005 HIOX INDIA - hioxindia.com

Other Links