We can get access to the text inside an
HTML element using its textContent
property.
As you can see in the console,
it logs the text Congratulations. But, the
text content later changes to Better greetings. The updated text
is displayed in the browser.