concatenate arrays in ruby
# Step 1: Define two arrays
array1 = [1, 2, 3]
array2 = [4, 5, 6]
# Step 2: Use the `+` operator to concatenate arrays
concatenated_array = array1 + array2
# Step 3: Display the result
puts concatenated_array
# Step 1: Define two arrays
array1 = [1, 2, 3]
array2 = [4, 5, 6]
# Step 2: Use the `+` operator to concatenate arrays
concatenated_array = array1 + array2
# Step 3: Display the result
puts concatenated_array