Methods With Arguments


What is wrong with that code? I try use return like instruction said I try use puts and it still return me this :
Oops, try again.
Make sure your method has a return statement.

print "What is your name ?"
name = gets.chomp
def welcome(name)
   puts "Hello, #{name}!"
print welcome(name)


You only need

this part and that's it! :slight_smile:


Thanx, but it works only with "return" now I see it. Forgot to relode page time to time - sometimes it works better than anything :slight_smile:


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.