JSFiddle - React, Tailwind, and code Playground

HTML

<table id="chargetable">
    <tr class="odd">
    <td class="charge1">0</td>
    <td class="nc1">0</td>
</tr>
<tr class="even">
    <td class="charge2">0</td>
    <td class="nc2">0</td>
</tr>
<tr class="odd">
    <td class="charge3">250</td>
    <td class="nc3">0</td>
</tr>
</table>

JavaScript

//if you require the original code for later use clone it 
var htmlclone = $('#chargetable').clone().html();
console.log(htmlclone);
$('#chargetable [class*=nc]').each(function(){
    var ncamount = $(this).html();
    var chargeamount = $(this).parents('tr').find('[class*=charge]').html();
    var totalnc = parseFloat(chargeamount) + parseFloat(ncamount);
    $(this).html(totalnc);
    console.log(chargeamount + ' ' + ncamount + ' ' + totalnc);
});
console.log(htmlclone);