Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def greeting # here we say def to define a method and put the name of our method
- puts "Please enter your name:" # here is the code inside our method
- name = gets.chomp
- puts "Hello" + " " + name
- end #and here we end or close our method
- greeting
Add Comment
Please, Sign In to add comment