You must divide by lenght-1 and takes the value from line number 1. Thats why you must substract 1 from length and add 1 to position
for (var i = 1; i<mo.rows.length;i++) {
mo.rows[i].cells[1].innerText=na.rows[i % (na.rows.length-1)+1].cell[0].innerText
}
1
solved Without the first line table