JSFiddle - React, Tailwind, and code Playground

by David Buzatto

HTML

<table id="tabela">
</table>

JavaScript

var $tabela = $( "#tabela" );

for ( var i = 0; i < 10; i++ ) {
    
    $tabela.append( 
        $( "<tr></tr>" ).append( 
            $("<td>Linha " + i + "</td>").append( 
                $( "<button type='button'>Remover!</button>" ).click(function(){
                    $(this).parent().parent().remove();
                })
            )
        )
    );
    
}