JavaScript to jQuery (function to add row to table)
<p>Can anyone help me to convert JavaScript to jQuery? The JavaScript code is:</p>

<pre><code>function addRow()
{       
     var table = document.getElementById("table2");     
     var numOfRows = table.rows.length;     
     var numOfCols = table.rows[numOfRows-1].cells.length;                    
     var newRow = table.insertRow(numOfRows);

     for (var j = 0; j &lt; numOfCols; j++) {                    
          newCell = newRow.insertCell(j);                    
          newCell.innerHTML = "add";
     }
}
</code></pre>
