Examveda

What is the output of the given code?
m= 0
loop do
    m += 1
    print m
    break if m == 10
end

A. 12345678910

B. 1 2 3 4

C. 2 3 4 5

D. None of the mentioned

Answer: Option A


This Question Belongs to Ruby Programming >> Control Structures In Ruby

Join The Discussion

Related Questions on Control Structures in Ruby