JSFiddle - React, Tailwind, and code Playground
HTML
<table id ="tbl">
<tr>
<td>5</td>
<td>12</td>
<td>15</td>
<td>17</td>
</tr>
<tr>
<td>3</td>
<td>6</td>
<td>12</td>
<td>13</td>
</tr>
</table>
Results:
<div id="results"></div>
JavaScript
$(function() {
var index = 0;
$("#tbl tr").find("td:gt(0)").each(function() {
$this = $(this);
$("#results").append(++index + ": " + (parseInt($this.html(), 10) - parseInt($this.prev().html(), 10)) + "<br/>");
})
});