javascript remove whitespace carriage return
<p>how can I remove whitespace and carriage return from a String. I got something like this.. </p>

<pre><code>exampleName↵
</code></pre>

<p>but need just the text and not the symbol at the end. </p>