Skip to content

Instantly share code, notes, and snippets.

@ibolmo
Created April 10, 2009 17:16
Show Gist options
  • Save ibolmo/93184 to your computer and use it in GitHub Desktop.
Save ibolmo/93184 to your computer and use it in GitHub Desktop.
Array.prototype.kami = function(by){
var a = [], temp = this.slice(0);
while (temp.length) a.push(temp.splice(0,by));
return a;
};
[0,1,2,3,4,5,6,7].kami(4)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment