JSFiddle - React, Tailwind, and code Playground
HTML
First name: <input type="text" id="firstname"><br>
<p>Your first name is: <b id='boldStuff2'></b> </p>
<p> Other people's names: </p>
<ol id="demo">
</ol>
<input type='button' onclick='changeText2()' value='Submit'/>
JavaScript
function changeText2(){
var firstname = document.getElementById('firstname').value;
document.getElementById('boldStuff2').innerHTML = firstname;
var node=document.createElement("demo");
var textnode=document.createTextNode(firstname);
node.appendChild(textnode);
document.getElementById("demo").appendChild(node);
}