title: Deleting table rows in javascript
body: <p>I'm having trouble with a function in javascript and can't figure out why.  It's really quite straight forward.  I'm trying to delete all the rows in a html table. so I wrote:</p>
  
  <pre><code>function delete_gameboard(){
     var table = document.getElementById("gameboard");
     var rowCount = table.rows.length;
     for (var i = 0; i &lt; rowCount; i++) {
        table.deleteRow(i);
     }
  }
  </code></pre>
  
  <p>Yet, it'll only delete half of them.  Can anyone see what's causing this strange behavior?</p>