Explanation of conditions

There are four different conditional statements.
If, if-else, if-elseif-else, and switch. If statements executes
some code if one condition is true. If-else statements execute
executes some code if a condition is true and another code if
that condition is false. A switch code is statement that is used
execute different actions based on different conditions.

Example of an if statement

40 is less than 50

Example of an if-elself-else statement

50 is equal to 50

Example of switch

Your favorite color is purple!