wmakeev
12/28/2014 - 5:47 AM

Split the array into parts

Split the array into parts

var codeGroups = [];
for (var i = 0, len = productCodes.length; i < len; i += groupSize) {
    codeGroups.push(_.first(_.last(productCodes, len - i), groupSize));
}