how to add text in a class in js code example
Example 1: javascript add class to element
var someElement= document.getElementById("myElement");
someElement.className += " newclass";//add "newclass" to element (space in front is important)
Example 2: js add more text to element
document.getElementById("p").textContent += " This is the text from javascript.";
<p id ="p">This is the text from HTML.</p>