 <p>In modern browsers you can do this without any external libraries in a few lines:</p> <pre><code>Array.prototype.flatten = function() { return this.reduce(function(prev, cur) { var more = [].concat(cur).some(Array.isArray); return prev.concat(more ? cur.flatten() : cur); },[]); }; console.log([['dog','cat',['chicken', 'bear']],['mouse','horse']].flatten()); //^ ["dog", "cat", "chicken", "bear", "mouse", "horse"] </code></pre>