Examveda

What is the output of the code?
 variable="true".reverse
   if variable
   puts "true"
   else
   puts "false"
   end

A. False

B. True

C. Syntax error

D. None of the mentioned

Answer: Option B


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

Join The Discussion

Related Questions on Control Structures in Ruby