Arrays are a core foundation of programming in Ruby and most languages. Arrays are so common that it is beneficial to know, and even memorize, some of their most commonly used methods. If you want to know more about Ruby Arrays, we have [an article about them](https://guide.freecodecamp.org/ruby/ruby-arrays).
The flatten method can be used to take an array that contains nested arrays and create a one-dimensional array:
``` ruby
array = [1, 2, [3, 4, 5], [6, 7]]
array.flatten
=> [1, 2, 3, 4, 5, 6, 7]
```
#### .join
The .join method returns a string of all the elements of the array separated by a separator parameter. If the separator parameter is nil, the method uses an empty string as a separator between strings.
``` ruby
array.join
=> "1234"
array.join("*")
=> "1*2*3*4"
```
#### .each
The .each method iterates over each element of the array, allowing you to perform actions on them.
The .map method is the same as the .collect method. The .map and .collect methods iterate over each element of the array, allowing you to perform actions on them. The .map and .collect methods differ from the .each method in that they return an array containing the transformed elements.
The .uniq method returns a copy of the array containing only unique elements--any duplicate elements are removed from the array. The original array is not modified.
The .concat method appends the elements from an array to the original array. The .concat method can take in multiple arrays as an argument, which will in turn append multiple arrays to the original array.