07. Loops/Elaboration

👨‍💼 Excellent work! You now have multiple tools for iteration!
You've learned:
  • 🔄 for loops - Precise control over iteration count
  • ⏱️ while loops - Continue until a condition changes
  • 📦 for...of - Clean syntax for iterating arrays
When to use each:
Loop TypeBest For
forWhen you need the index or specific iteration count
whileWhen you don't know how many iterations ahead of time
for...ofWhen you just need each value from an array
forEach/map/filterWhen transforming or filtering arrays
📝 Remember: with great looping power comes great responsibility. Always ensure your loops will eventually end - infinite loops crash programs!

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 7 using the epicshop MCP server. Call the get_quiz_instructions tool with exerciseNumber "7" to get the quiz instructions, then quiz me one question at a time.

Learn how to set up the epicshop MCP server

Loading Loops Elaboration form