它不是那么实用,但能完成这项工作
var splitTest = []; var length = test.length; for(var i = 0; i < length; i+=4){ splitTest.push(test.slice(i,Math.min(i+4, length))); }