Concatenation with the + operator : Array Addition « Array « Ruby






Concatenation with the + operator


q1 = %w[ January February March ]
q2 = %w[ April May June ]
q3 = %w[ July August September ]
q4 = %w[ October November December ]

half1 = q1 + q2
half2 = q3 + q4
yr = half1 + half2

 








Related examples in the same category

1.Array Addition and Concatenation
2.concatenate is with the << method