100 句话是微不足道的,使用数组不应该对性能产生任何影响,但你可以随时尝试......
http://jsfiddle.net/ZpCfB/(有100个)
http://jsfiddle.net/ZpCfB/1/(有4000)
var sentences = [[], [], [], []],
groupCount = 4,
i = 0,
sentence = 'This is a very very very long sentence This is a very very very long sentence This is a very very very long sentence This is a very very very long sentence This is a very very very long sentence This is a very very very long sentence This is a very very very long sentence This is a very very very long sentence This is a very very very long sentence This is a very very very long sentence This is a very very very long sentence This is a very very very long sentence This is a very very very long sentence This is a very very very long sentence This is a very very very long sentence This is a very very very long sentence sdfsdfsdf sdfsdfsdfsdf sdfsd sdfsdfsdfsdf sdfsd fsdfsdfsdf s.';
for (; i < 25; i++) {
for (x = 0; x < 4; x++) {
sentences[x].push(sentence);
}
}
console.log(sentences);