Back to Developer Roadmap

do/while Loops

src/data/roadmaps/ruby/content/dowhile@OwRukUn8ypko_hPUHkxv_.md

4.0695 B
Original Source

do/while Loops

do/while loops are a type of control flow statement that executes a block of code at least once, and then repeatedly executes the block as long as a specified condition is true. The condition is checked after the code block is executed, ensuring the block runs at least one time regardless of the initial state of the condition. This is different from a while loop, where the condition is checked before the code block is executed.

Visit the following resources to learn more: