Ruby - Methods
Given this method, what will it return?
def complex
x = 5
y = x * 2
if y > 5
y
else
x
end
end
complexdef complex
x = 5
y = x * 2
if y > 5
y
else
x
end
end
complexy > 5 is true.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions