Good morning all!
I want to know if Im interpreting this if statement below right.
if(((1) || (0)) && (1)){
do stuff;
}
This is saying: if true piped into false, then true, then do stuff. Right?
What does the && stand for?
thanks in advance!
ben
|| = logical or
&& = logical and
((1) || (0)) = Return true that means 1
1 ( refer the previous answer ) && (1) = Return True of course
Dear Friend
|| => Logical OR
&& => Logical AND
In operator || if one value is true, the condition is true
In operator && both value should be true, if we want ,true value
((1) || (0))
IN the above statement 1 || 0 is 1. So it is true.
1 && 1
This also true.
So both conditions are true. It will do some stuff