for logical && both the parameters must be true , then it ll be entered in if {} clock otherwise it ll execute else {}. for logical || one of parameter or condition is true is sufficient to execute if {}.
if( (A) && (B) ){
//if A and B both are true
}else{
}
if( (A) ||(B) ){
//if A or B is true
}else{
}