Javascript Array splitEvery(n)

Description

Javascript Array splitEvery(n)


Array.prototype.splitEvery = function(n){
  return range(this.length/n).map(x=>this.slice(x,x+n))
}



PreviousNext

Related