Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript JavaScript Loops Simplify Repetitive Tasks with Loops The do...while Loop

David Douglas
David Douglas
3,719 Points

Real world applications

What are some real world condition where a For, while, and do...while Loop are used

1 Answer

Ali Waris
Ali Waris
2,303 Points

Validating User Input: When you need to validate user input and ensure that a specific action happens before checking the validity.

Menu-driven Programs: In scenarios where you want to present a menu to users and ensure they make a choice before proceeding.

Repeating an Action: When you need to repeat an action based on user interaction or some other condition.