Q. What is the output of the following code snippet?
x = 1
loop do
puts x
x += 1
break if x > 5
end
x = 1
loop do
puts x
x += 1
break if x > 5
end
β
Correct Answer: (A)
1 2 3 4 5
You must be Logged in to update hint/solution