peterschussheim
10/12/2016 - 2:04 PM

concatAll

concatAll

function concatAll(array) {
  var results = [];
  array.forEach(function(list) {
    list.forEach(function(el) {
      results.push(el);
    });
  });
  return results;
}

var data = [ [1,2,3], [4,5,6], [7,8,9] ];

concatAll(data)

concatAll

This Gist was automatically created by Carbide, a free online programming environment.

You can view a live, interactive version of this Gist here.