Ruby - Methods
What will be the output of the following Ruby code?
def greet(name)
"Hello, #{name}!"
42
end
puts greet("Alice")def greet(name)
"Hello, #{name}!"
42
end
puts greet("Alice")15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions