+ 4
what is the difference between ELSE IF AND IF ELSE us in js
else if
3 odpowiedzi
+ 9
if-else used in only single if else condition like this :-
if (condition satisfied) {
return true;
} else {
return false;
}
else if used in nexted if else condition like this :-
if (condition satisfied) {
return true;
} else if(another condition satisfied) {
return true;
} else {
return false;
}
+ 4
The else in an ifelse statemenr is nested while else if is like another if statement
+ 2
else if goes in between the if and else conditions.