Created
April 18, 2014 23:25
-
-
Save royriojas/11068334 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var splitArray = function (origin, chunkSize ) { | |
origin = origin || []; | |
var arr = []; | |
for ( var i = 0, len = origin.length; i < len; i += chunkSize ) { | |
arr.push( origin.slice( i, i + chunkSize )); | |
} | |
return arr; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment