Update flatten-array.js

Using .concat and .apply to merge nested arrays into a single array.