If vs Else If
A Guide for the Aspiring Programmer
What is an If Statement?
- Used to implement a decision.
- If the test succeeds, the body of the statement is executed.
- Most basic of all the control flow statements
- Good for two option situations
- Uses Boolean Operators
- Conditional statements
- Can be nested
ELSE IF STATEMENTS
- Can test more than two choices
- Faster than a giant list of if statements