|| OR, - true, true.
if(expression1 || expression 2)
, expression1 expression2 true, true.
& is the sign of AND , if any one variable is false , then returns false . >.
if(expression1 && expression 2)
This means that if one variable expression1 or expression2 returns false , then the whole condition will return false . In this case, if both variables are true , then if the condition returns true
source
share