Latest News

Logical Operators in Javascript,Logical Operators

Logical Operators:
and(&&) : It is used to verify multiple condition, when all conditions are true, then it written true.
Syntax : var x=10;
var y=’10’;
if((x==y)&&)x<=y)&&(x>=y))
{
document.write(‘<br>.success’);
}
or(||): it is used to verify multiple conditions if at least one condition is true it written true.
Syntax :
var x=10;
var y=’10’;
if((x==y)”(x<=y)”(x>=y))
{
document.write(‘<br>success’);
}
Not(!) : When condition is true it written false and condition is false it written true.
Syntax :
var x=10;
var y=’10’;
if(!(x!=y))
{
document.write(‘<br>success’);
}

No comments:

Post a Comment

eWeb Classes Powered by MV Innovative InfoTech Copyright © 2014

Theme images by Bim. Powered by Blogger.