Ruby - Methods
Which of the following Ruby method definitions correctly uses implicit return?
a + b implicitly without return.return, def add(a, b)
puts a + b
end returns nil because puts returns nil, def add(a, b)
a + b; return
end has return with no value, returning nil.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions