Ruby - Loops and Iteration
Identify the problem in this Ruby code:
i = 0
while i < 3
i += 1
if i == 2
redo
end
puts i
endi = 0
while i < 3
i += 1
if i == 2
redo
end
puts i
endredo restarts the iteration without incrementing i again.redo repeats the iteration without incrementing i. -> Option D15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions