scrimba
Frontend Career Path
Making websites interactive
Chrome Extension
How to render <li> elements with innerHTML
Go Pro!Bootcamp

Bootcamp

Study group

Collaborate with peers in your dedicated #study-group channel.

Code reviews

Submit projects for review using the /review command in your #code-reviews channel

How to render <li> elements with innerHTML
AboutCommentsNotes
How to render <li> elements with innerHTML
Expand for more info
index.js
run
preview
console
let myLeads = ["www.awesomelead.com", "www.epiclead.com", "www.greatlead.com"]
const inputEl = document.getElementById("input-el")
const inputBtn = document.getElementById("input-btn")
const ulEl = document.getElementById("ul-el")

inputBtn.addEventListener("click", function() {
myLeads.push(inputEl.value)
console.log(myLeads)
})


for (let i = 0; i < myLeads.length; i++) {
ulEl.textContent += myLeads[i] + " "
}



Console
/index.html
-1:33