Array Addition and Concatenation : Array Addition « Array « Ruby






Array Addition and Concatenation


x = [1, 2, 3]
y = ["a", "b", "c"]
z = x + y
puts z.inspect

 








Related examples in the same category

1.Concatenation with the + operator
2.concatenate is with the << method