Nodejs Utililty Methods Array Merge All

List of utility methods to do Array Merge All

Description

The list of methods to do Array Merge All are organized into topic(s).

Method

mergeAll()
var school = [
  [1, 2, 3],
  [4, 5, 6, 7, 8, 3],
  [5, 3, 5]
];
Array.prototype.mergeAll = function() {
  var result = [];
  this.forEach(function(subArray) {
    result.push.apply(result, subArray);
...
mergeAll()
Array.prototype.mergeAll = function() {
  var results = [];
  this.forEach(function(subArray) {
    subArray.forEach(function(number) {
      results.push(number);
    });
  });
  return results;
};
...
mergeAll()
Array.prototype.mergeAll = function() {
    var results = [];
    this.forEach(function(subArray) {
    subArray.forEach(function(element) {
      results.push(element);
    });
    });
    return results;
};
...
mergeAll()
Array.prototype.mergeAll = function() {
    var results = [];
    this.forEach(function(subArray) {
      subArray.forEach(function(itemInArray) {
        results.push(itemInArray);
      });
    });
    return results;
};
...
mergeAll()
Array.prototype.mergeAll = function(){
  var result = [];
  this.forEach(function(subArray){
    subArray.forEach(function(item){
      result.push(item);
    })
  })
  return result;
mergeAll()
Array.prototype.mergeAll = function(){
  var result = [];
  this.forEach(function(subArray){
    subArray.forEach(function(item){
      result.push(item);
    })
  })
  return result;
var a = [[1,2],[3,4]];
a.mergeAll();