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/41764061/adding-text-to-an-existing-text-element-in-javascript-via-dom