Skip to content

Instantly share code, notes, and snippets.

@kmandreza
Created January 12, 2013 04:19
Show Gist options
  • Save kmandreza/4516060 to your computer and use it in GitHub Desktop.
Save kmandreza/4516060 to your computer and use it in GitHub Desktop.
Create a method new_cat which takes as its input two strings. It should concatenate the strings and return the concatenated value, without modifying either of the input strings. For example, # One does not simply walk into... new_cat("Mor", "dor") # => "Mordor" Call this method and send your first and last name as arguments.
def new_cat(str1, str2)
str1 + str2
end
puts new_cat("Mor","dor")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment