Create flatten-array.js