Skip to content

Commit 2dfb435

Browse files
committed
Make solution 14.1 agree with its hints
Closes marijnh#502
1 parent 7977c10 commit 2dfb435

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

code/solutions/14_1_build_a_table.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ <h1>Mountains</h1>
2323
let headRow = document.createElement("tr");
2424
fields.forEach(function(field) {
2525
let headCell = document.createElement("th");
26-
headCell.textContent = field;
26+
headCell.appendChild(document.createTextNode(field));
2727
headRow.appendChild(headCell);
2828
});
2929
table.appendChild(headRow);
@@ -32,7 +32,7 @@ <h1>Mountains</h1>
3232
let row = document.createElement("tr");
3333
fields.forEach(function(field) {
3434
let cell = document.createElement("td");
35-
cell.textContent = object[field];
35+
cell.appendChild(document.createTextNode(object[field]));
3636
if (typeof object[field] == "number") {
3737
cell.style.textAlign = "right";
3838
}

0 commit comments

Comments
 (0)