JSFiddle - React, Tailwind, and code Playground

by Irvansychrldi

HTML

<link rel="stylesheet" href="//cdn.datatables.net/1.10.21/css/jquery.dataTables.min.css">
<script src="//cdn.datatables.net/1.10.21/js/jquery.dataTables.min.js"></script>

<table id="example">
    <thead>
        <tr>
            <th>example 1</th>
            <th>example 2</th>
            <th>example 3</th>
            <th>example 4</th>
            <th>example 5</th>
        </tr>
    </thead>
    <tbody>
                          <tr>
                              <td>first item</td>
                              <td>1.2345</td>
                              <td>2.3456</td>
                              <td>3.4567</td>
                              <td>4.5678</td>
                          </tr>
                          <tr>
                              <td>second item</td>
                              <td>9.8765</td>
                              <td>3.5454</td>
                              <td>4.2627</td>
                              <td>8.2354</td>
                          </tr>
                          <tr>
                              <td>third item</td>
                              <td>8.5678</td>
                              <td>3.5601</td>
                              <td>0.0121</td>
                              <td>1.3254</td>
                          </tr>
                        </tbody>
</table>

JavaScript

$(document).ready(function () {
    var table = $('#example').DataTable();

    table.rows().every( function ( rowIdx, tableLoop, rowLoop ) {
        var data = this.data();
        var values = data.slice(1).map(Number);
        console.log( data[0] + ': ' + Math.max( ...values ) );
    } );
});