👨💼 Wonderful! Your code can now make decisions!
You've learned:
- 🔀 if/else - The foundation of conditional logic
- 🎯 switch - Clean handling of multiple specific cases
- ❓ Ternary - Compact inline conditions
When to use each:
- if/else - Most situations, especially complex conditions
- switch - When comparing one value against many possibilities
- ternary - Simple either/or assignments
📝 Practice combining these with the operators you learned earlier. The
combination of operators and control flow is incredibly powerful!
Test Your Knowledge
Retrieval practice helps solidify learning by actively recalling information. Use this prompt with your AI assistant to quiz yourself on what you've learned.
Please quiz me on exercise 3 using the epicshop MCP server. Call the get_quiz_instructions tool with exerciseNumber "3" to get the quiz instructions, then quiz me one question at a time.