Trying to remove characters at the end of a string in three p elements using the same class
<p>Looking to be able to use a class instead of an ID as I have three p elements that I need to remove 1- characters from. Any thoughts would be much appreciated. Initial reply thanks to Tim Down (and due to my very ropey explanation of what my problem was - shown below) I'm sure this is much easier than I know! Thanks.</p>

<pre><code>&lt;p id="test"&gt; Nice text in here &lt;/p&gt;

var textNode = document.getElementById("test").firstChild;
textNode.data = textNode.data.slice(0, -10);
</code></pre>
