Javascript Array unwind()

Description

Javascript Array unwind()


Array.prototype.unwind = function() {
 var results = [];
 this.forEach(function(subArray) {
    subArray.forEach(function(item) {
   results.push(item);//  w  w  w.  j  ava 2  s . c om
    });
 });

 return results;
};



PreviousNext

Related