How would you solve this problem in Ruby. "Define a method called yeller that takes in an array of characters and returns a string with an ALLCAPS version of the input. Verify that yeller([’o’, ’l’, ’d’]) returns "OLD". Combine the .join, .map, .upcase methods."
So far I have:
def yeller(x)
x.map do |y|
y.upcase.join
puts y
end
end
yeller(['o', 'l', 'd'])
%w(o l d)instead of['o', 'l', 'd'].