title: Get last row of table attribute
body: <pre><code>var table = document.getElementById(table1);
  var lastRow = table.rows.length;
  
  var country = lastRow.getElementById('Country');
  country.setAttribute('class', "Country"+lastRow);   
  </code></pre>
  
  <p>Im pretty new and I was wondering if this is possible? </p>
  
  <p>Instead of </p>
  
  <pre><code>var Country= document.getElementById('Country');
  </code></pre>
  
  <p>As I have other id=Country because I am adding new rows..</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>I know ID are unique. But I am cloning the last row so of course the IDs will all be the same.</p>