Answer Posted / Chandan Kumar Jaiswal
The redo statement in Ruby causes the current iteration of a loop (such as while, until, or for) to repeat immediately. It does not continue with the next iteration but restarts the current one.n```rubynfor i in 1..5n if i == 3n redo # repeats this iterationn endnnputs i # this line will be executed twice for i=3 because we redid the loop
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers