Re: Ruby Datastructure Return multiple values with a method
def showme()
return “Thank”, “you”
end
array = showme
puts array.join(“ “)
showme
if you want the text to be displayed with spaces between words, assign an array to the method and use the join method on the array.
__________________ Shaalini.S Be the Best of Whatever you are... |