I've been working on this for a day or so and I'm a bit stuck so I'm hoping I can come out of this with a clearer idea of what's going on.
Essentially I'm creating a HTML table using a nested for loop. The goal is to have a table that spans 7 columns per row.
var tbl = document.createElement("table");
for (var i = 15; i < 36; i++) {
    for (var j = 0; j < 7; j++) {
        var row = document.createElement("tr");
        var cell = document.createElement("td");
        var cellText = document.createTextNode(i);
        row.appendChild(cell);
        tbl.appendChild(row);
    }
    cell.appendChild(cellText);
}
$('#calendar').append(tbl);
Anticipated Result:
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31 32 33 34 35
Actual Result:
15
16
17
18
19
20
21
22
23
...
35
Simplified the result for the sake of typing less but if anyone can please point me in the right direction, I'd love to know where I might going wrong with this. Thank you.

