Ruby - Methods
What will this Ruby method return?
def check
if false
'yes'
else
'no'
end
end
p checkdef check
if false
'yes'
else
'no'
end
end
p checkfalse, so the else branch executes, returning 'no'.p prints "no" including quotes.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions