I want to delete the last and not the initials, I did not find an idea, who is trying
<p id="demo">I want to delete the last and not the initials, I did not find an idea, who is trying</p>
<script>
document.getElementById("demo").innerText=
document.getElementById("demo").innerText.replace( /(.{10})/," " );
</script>