Answer Posted / Vikash Kumar Anand
The do-while loop is a control structure that repeats a block of code as long as the specified condition evaluates to true. Unlike the traditional while loop, the do-while loop always executes the code block at least once before checking the condition. In Ruby, the syntax for a do-while loop looks like this: nndon # code blocknwhile conditionnend
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers