I am trying to figure how to add text to a p tag or h1 tag that already has a text node.
For example:
var t = document.getElementById("p").textContent;
var y = document.createTextNode("This just got added");
t.appendChild(y);
<p id="p">This is some text</p>
question from:https://stackoverflow.com/questions/65946049/how-do-i-get-text-in-html-element-with-javascript