js create div and add content code example
Example 1: JavaScript append text to div
var div = document.getElementById('myElementID');
div.innerHTML += "Here is some more data appended";
Example 2: javascript add text to li
let arr = ["g", "o", "o", "g", "L", "e";
let ul = document.getElementById("id_ul");
let i =0;
arr.map(arr=>{
var li = document.createElement("li");
ul.appendChild(li);
li.innerHTML = arr[i];
})