JSFiddle - React, Tailwind, and code Playground

by Muzaffar Rasulov

HTML

<p class="progressInfo"></p>
<table class="mytable" cellspacing="0" border="1">
  <thead>
    <tr>
      <th>№</th>
      <th>НОМЕР</th>
      <th>ИНДЕКС</th>
      <th>СОСТ</th>
      <th>ДАТА</th>
      <th>ВРЕМЯ</th>
      <th>ПАРК</th>
      <th>ВАГ</th>
      <th>УДЛ</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td>1</td>
      <td>2033</td>
      <td>7200 34 6980</td>
      <td>ФОРМ</td>
      <td>31.05</td>
      <td>00-19</td>
      <td>00/00</td>
      <td>50</td>
      <td>50</td>
    </tr>
  </tbody>
</table>

JavaScript

function checking() {
   var rowsCount = document.getElementsByClassName("mytable")[0].getElementsByTagName('tr').length;
   var endRowFCellVal = document.getElementsByClassName("mytable")[0].rows[rowsCount - 1].cells[0].innerHTML;
   
   document.getElementsByClassName("progressInfo").innerHTML = endRowFCellVal;

   console.log(rowsCount - 1);
   console.log(endRowFCellVal);
   if ((rowsCount - 1) != endRowFCellVal) {
       console.log("FIGNYA!")
   }
}