• 1 Post
  • 8 Comments
Joined 1 year ago
cake
Cake day: June 16th, 2023

help-circle





  • The use cases definitely do come up where you want the logic inside the loop to execute at least once. One common use case I have is validating user input in console applications. Put the instructions for validating the user’s inputs inside a do while and then run logic to validate it at the end - that way you can easily loop back to the start and re-prompt them for the user input again.