I'm adding a few thousand rows to a table so i need the speed of native javascript for this one.

Currently I'm using:

nThName = document.createElement("TH"); nThName.appendChild(document.createTextNode(workers[i].name)); nTr.appendChild(nThName);

Is there a way to do this in one line (without losing any performance?) so I don't need the nThName variable?

There are over 50 cells on each row so I would prefer:

nTr.appendChild(document.createElement("TH").appendChild(document.createTextNode(workers[i].name)));

but that don't work.. obviously