Skip to content

Instantly share code, notes, and snippets.

@themonster2015
Created September 27, 2016 08:56
Show Gist options
  • Save themonster2015/a8b6bddfae199c9fed3a83057ae20c23 to your computer and use it in GitHub Desktop.
Save themonster2015/a8b6bddfae199c9fed3a83057ae20c23 to your computer and use it in GitHub Desktop.
def greeting
puts "Your name:"
name = gets.chomp
puts "Hello" + " " + name
end
greeting
variable is used to store values in the memory, method is a function, argument is variable that we give a method
"2" + "2" doesn't give you 4 in Ruby because they are strings
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment