我需要分块发送博客文章,最好是用句子或单词来翻译并返回我已经有了翻译功能我只需要帮助将它分成块并取回我如何才能做到这一点?
//["this","is","the","post"]
var bod = a.body.split(" ");
var counter = 0;
while(counter < bod.length){
counter++;
var rang = bod.slice(counter, 10);
//then translate the remaining portion with the code that is ready
console.log(rang);
if(counter === bod.length || counter > bod.length){
console.log("end");
return;
}
}