if and if else ladder, Switch, ternary operation


An if else statement in programming is a conditional statement that runs a different set of statements depending on whether an expression is true or false. If the expression is true, the if instructions are taken; if not, the ELSE instructions are taken.