Learn Ruby
Array
14.8
Lesson

Concatenation

In the programming world concatenation means adding two items.

Just like string concatenation we can use + to concatenate two arrays.

In this above case number1 and number2 did not change at all. A new array was created by concatenation the two arrays. When push is used to add an item to array then the original array itself changes.