The major difference is that when using the innerHTML property, the client browser will actually interpret the content as HTML markup, and apply that change to the DOM/Window. On the other hand, the textContent property will only change the the text, preserving any HTML markup.
In this video I take you through a basic example to demonstrate that difference.
Support me on Patreon:
– with enough funding I plan to develop a website of some sort with a new developer experience!
For your reference, check this out:
Follow me on Twitter @dcode!