Logical operators are typically used with Boolean (logical) values. When they are, they return a Boolean value. However, the && and || operators actually return the value of one of the specified operands, so if these operators are used with non-Boolean values, they may return a non-Boolean value.
Syntax
a1 =true&&true// t && t returns truea2 =true&&false// t && f returns falsea3 =false&&true// f && t returns falsea4 =false&& (3==4) // f && f returns falsea5 ='Cat'&&'Dog'// t && t returns "Dog"a6 =false&&'Cat'// f && t returns falsea7 ='Cat'&&false// t && f returns falsea8 =''&&false// returns ""a9 =false&&||// returns false