If Statement: This statement checks whether a condition is true or false.If the statement is true, all the code in the braces '{}' is executed. There are other versions of the If statement including an If…else, or a nested If statement.
Switch Statement: This is a multi-branch control statement that defines a condition and whose result determines the code that is executed. A switch statement has multiple cases and for each case there are listed statements that will be executed if that case satisfies the condition.
Ternary Operator: This control structure acts as an If…else statement. It is primarily used because it is much more convenient to code than writing out an If…else statement
Switch Statement: This is a multi-branch control statement that defines a condition and whose result determines the code that is executed. A switch statement has multiple cases and for each case there are listed statements that will be executed if that case satisfies the condition.
Ternary Operator: This control structure acts as an If…else statement. It is primarily used because it is much more convenient to code than writing out an If…else statement