marijnh / Eloquent-JavaScript

The sources for the Eloquent JavaScript book
https://eloquentjavascript.net
3.02k stars 796 forks source link

Ch14 - exercise - build a table #502

Closed jasontwuk closed 4 years ago

jasontwuk commented 4 years ago

The hint for this exercise suggests us to use document.createTextNode to create text nodes. https://eloquentjavascript.net/14_dom.html#p_2Q6e2rAy5t But the solution for this exercise is using Node.textContent to add text content to the nodes. https://eloquentjavascript.net/code/#14.1 I understand both methods work, but I think it might be nicer if the hint and solution are using the same method. Thank you.

marijnh commented 4 years ago

Thanks for noticing that. Attached patch adjusts the solution.