SQL PHP HTML ASP JavaScript articles and free scripts to download
JavaScript Basics

AND OR NOT the logical operators

Logical operators are mostly consist of AND OR NOT and its combinations. We will discuss more on this with examples for better understanding.

We will use if condition to check and then document.write to print the result. Here is the code.

AND is also written as &&
OR is written as ||
NOT is written as !
NOT EQAL TO !=


var my_var=5;
var my_var2="plus2net";

Here is a table with different examples of logical operators
my_var=="5" && my_var2=="plus2net"True
my_var==="5" && my_var2=="plus2net"False
my_var==5 || my_var2=="plus2net"True
my_var==4 || my_var2=="plus2net"True

Google+

Post Comment This is for short comments only. Use the forum for more discussions.
Name
Email( not to be displayed)Privacy Policy
1+2=This is to prevent automatic submission by spammers. Please enter the result of the sum as asked

JavaScript Basic functions
Variables
Functions
Detecting Browser type



Join Our Email List
Email:  
For Email Newsletters you can trust
HTML . MySQL. PHP. JavaScript. ASP. Photoshop. Articles. FORUM Contact us

©2000-2014 plus2net.com All rights reserved worldwide Privacy Policy Disclaimer