Making Decisions
Conditionals control which code runs based on a boolean expression. They are the core of business rules and UI states.
Use if/else for flexible logic and switch when you have a single value with multiple discrete cases.
- Use `if` for a single branch.
- Use `if...else` for two outcomes.
- Use `else if` ladders for multiple ranges.