We have an array which contains other arrays.
We want to keep all the items of the array but we want to remove all the arrays.
flatten to do this job.
As we can see
array2 does not have any array element.
flatten does not change original array.
The original array1 is still containing array items.