What is the output of the given code?
x="ruby".length
y="language".length
puts x,y
unless x>y
print "length of x is less than that of y"
end
x="ruby".length
y="language".length
puts x,y
unless x>y
print "length of x is less than that of y"
endA. 4
8
B. 4
8
length of x is less than that of y
C. Syntax error
D. None of the mentioned
Answer: Option B

Join The Discussion