Q. What is the output of the code?
variable="true".length
if variable
puts "true"
else
puts "false"
end
variable="true".length
if variable
puts "true"
else
puts "false"
end
β
Correct Answer: (B)
True