最初にあなたの質問に答えるには、次のようになります。
var test = "I have been messing around with .split and .slice for hours. But no success. I don't even have to 'keep' the remainder of the text, since it will be loaded again when the user will click read more, on the 'detail page'. So onwards from word 30, the text could be removed from the DOM. answers regarding displaying a set number of characters instead of words are also helpful."
var splittest = test.split(' ')
splittest.slice(0, 10)
(returns ["I", "have", "been", "messing", "around", "with", ".split", "and", ".slice", "for"])
しかし、私はこれをしません。代わりに、テキストの量を制限することをお勧めします。そうすれば、単語の始まり/終わりを検出する必要があるという心配が少なくなります。また、スタイリングがより簡単で予測しやすくなります。
test.slice(0, 300)
(returns "I have been messing around with .split and .slice for hours. But no success. I don't even have to 'keep' the remainder of the text, since it will be loaded again when the user will click read more, on the 'detail page'. So onwards from word 30, the text could be removed from the DOM. answers regardi")
さらに良いのは、このテキストサーバー側の生成を制限することです。すべてのデータを送信して使用しないのは、帯域幅の無駄です。