Ruby String Concatenation
Ruby strings can be concatenated using the +
operator.
first_name = 'Harry'
last_name = 'Potter'
full_name = first_name + ' ' + last_name
# "Harry Potter"
Ruby can also concatenate with the <<
operator.
first_name = "Ron"
last_name = "Weasley"
full_name = ""
full_name << first_name # Ron
full_name << last_name # RonWeasley
full_name # RonWeasley