In the body there is a text for example:
<body> Какой то текст </body> When I take it to Java script and break it into separate words for example:
<script> var bodyHTML = document.getElementsByTagName('body')[0].innerHTML; var bodyHTML = bodyHTML.split(' '); console.log(bodyHTML); </script> I see an array in the console
["↵Какой", "то", "текст↵↵"] Those. the first word is preceded by the arrow of the Enter key ↵ and two of the same arrows after the last word. How to remove them with Java script without changing the body html code?