title: Add new Row before first row in java script
body: <p>Hi I have code as follows:</p>
  
  <pre><code>function addRowToTable(num){
  if (hasLoaded) {
      var tbl = document.getElementById(TABLE_NAME);
      var nextRow = tbl.tBodies[0].rows.length;
      var iteration = nextRow + ROW_BASE;
      if (num == null) {
          num = nextRow;
      } else {
          iteration = num + ROW_BASE;
      }
  
      // add the row
      var row = tbl.tBodies[0].insertRow(num);
  
      // cell
      var cell0 = row.insertCell(0);
      var LNInpT = document.createElement('input');
      LNInpT.setAttribute('type', 'text');
              LNInpT.setAttribute('value', 'name');
              cell0.appendChild(LNInpT);
  
      // Pass in the elements you want to reference later
      // Store the myRow object in each row
      row.myRow = new myRowObject(textNode, txtInp, cbEl, raEl);
  }}
  </code></pre>
  
  <hr>
  
  <p>Please help me to Add new Row before first row in table with editing this code.
  tanks</p>