Ruby - Methods
What will be the output of this Ruby code?
def empty_string?(str)
str.empty?
end
puts empty_string?("")
puts empty_string?("hello")def empty_string?(str)
str.empty?
end
puts empty_string?("")
puts empty_string?("hello")15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions