What is the difference between textContent and innerText in JavaScript?

Can I use textContent as follows:

var logo$ = document.getElementsByClassName('logo')[0];
logo$.textContent = "Example";

10 Answers
10

Tags:

Leave a Reply

Your email address will not be published. Required fields are marked *