Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

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];
})
 
PREVIOUS NEXT
Tagged: #javascript #add #text #li
ADD COMMENT
Topic
Name
2+4 =