var geth4text = document.querySelector("#post > div > h4").innerHTML;
var text = "";
var i;
for (i = 0; i < geth4text.length; i++) {
s = geth4text[i]
text += "<li>"+s+"</li>";
}
for (i = 0; i < geth4text.length; i++) {
}
document.getElementById("demo").innerHTML = text;
<div id="post"><div>
<h4>Example 1</h4>
<h4>Example 2</h4>
<h4>Example 3</h4>
<h4>Example 4</h4>
<h4>Example 5</h4>
</div></div>
<span>Example</span>
<div id="demo"></div>
This code outputs all characters from or h4 content
I am trying to extract the whole sum as it is in the first formula but within the "<li>
"