Salve a tutti , auguri di un sereno natale...
ho dei problemi nel creare dinamicamente una tabella con js..

codice:
function creaRow(){
            var elemTable=document.getElementById('tableDati');
            
            var tblBody = document.createElement("tbody");
            var tableR=createElement("tr");
            
            var tdNome=createElement("td");
            var cellText=document.createTextNode("pippo");
            tdNome.appendChild(cellText);
            tableR.appendChild(tdNome);
            
            var tdCognome=createElement("td");
            cellText=document.createTextNode("baudo");
            tdCognome.appendChild(cellText);
            tableR.appendChild(tdCognome);
            
            var td=createElement("td");
            cellText=document.createTextNode("è capellone");
            tdIndirizzo.appendChild(cellText);
            tableR.appendChild(td);
            
            tblBody.appendChild(tableR);
            elemTable.appendChild(tblBody);
        }