Javascript: How can I remove appended child row (tr)?
<p>I am using JS to append array data to a table.</p>

<p>I am trying to add a button that removes the appended data, and puts its own data in instead.  I can get the data to be added, but I cant get the data removed. </p>

<p>I have tried these with no luck - </p>

<pre><code>.children().last().remove();
</code></pre>

<p>&amp;</p>

<pre><code>           .removeChild() ;
</code></pre>

<p>I have a fiddle but I cant get the original data remove when new added (button now works! -thanks) - <a href="http://jsfiddle.net/2waZ2/37/" rel="nofollow">http://jsfiddle.net/2waZ2/37/</a>
What code do I add so when the new line from the array is added the old data is removed?</p>

<p>Code to append on load:</p>

<pre><code>var row =  document.createElement('tr');
row.innerHTML = displayArrayAsTable(QR4, 24, 25);
document.getElementById('mytable').appendChild( row ) ; 
</code></pre>

<p>Button code to add data:</p>

<pre><code>function addNewRow() {
var row =  document.createElement('tr');
row.innerHTML = displayArrayAsTable(QR4L, 24, 25);
 document.getElementById('mytable').appendChild( row ) ;
}
</code></pre>
