Examveda

What is the output of the given code?
m= 8
loop do
    m += 2
    puts m
    break if m == 16
end

A. 10 12 14 16

B. Nil

C. Error

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