Here you can find the source of concatAll()
/**//from w w w .j a v a2 s. co m * Function merges multiple arrays into one flat array. */ Array.prototype.concatAll = function() { let results = []; for (let i = 0; i < this.length; i++) { results.push.apply(results, this[i]); } return results; };
Array.prototype.concatAll = function() { var results = []; this.forEach(function(subArray) { results.push.apply(results, subArray); }); return results; };
Array.prototype.concatAll = function() { var results = []; this.forEach(function(subArray) { subArray.forEach(function(item) { results.concat(item); }); }); return results;
Array.prototype.concatAll = function() { var results = []; this.forEach(function(subArray) { subArray.forEach(function(innerData){return results.push(innerData)}) }); return results; };
Array.prototype.concatAll = function() { var results = []; this.forEach(function(subArray) { subArray.forEach(function(element) { results.push(element); }); }); return results; }; ...
Array.prototype.concatAll = function() { let result = []; this.forEach(items => result = result.concat(items) ); return result;
Array.prototype.concatAll = function() { return this.reduce((results, current) => { if(Array.isArray(current)) { return results.concat(current).concatAll(); } else { return (results.push(current), results); }, []); }; ...
Array.prototype.concatAll = function() { var results = []; this.forEach(function(subArray) { if (Array.isArray(subArray)) { subArray.forEach(function(item) { results.push(item); }); }); ...
Array.prototype.concatAll = function () { let results = []; this.forEach(function (subArray) { results.push.apply(results, subArray); }); return results; };
Array.prototype.concatAll = function() { var results = []; this.forEach(function(subArray) { subArray.forEach((i) => { results.push(i); }); }); return results; }; ...