JSFiddle - React, Tailwind, and code Playground

HTML

<table id="tbl">
    <tr>
        <td> <a href="1">test1</a>
 <a href="2">test2</a>  <a href="3">test3</a>
        </td>
        <td>
            <label>foo1</label>
        </td>
        <td>
            <label>foo2</label>
        </td>
        <td>
            <label>foo3</label>
        </td>
    </tr>
</table>

JavaScript

$('#tbl td a').each(function(i) {
    var text = $('#tbl label').eq(i).text(),
        oldHref = $(this).attr('href');
    $(this).attr('href', oldHref + text);
});