scrimba
Frontend Career Path
Essential JavaScript concepts
JS Mini Projects
The dangers of 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

AboutCommentsNotes
The dangers of innerHTML
Expand for more info
index.js
run
preview
console
const filmInput = document.getElementById('film-input')
const addBtn = document.getElementById('add-btn')
const filmList = document.getElementById('film-list')

addBtn.addEventListener('click', function() {
filmList.innerHTML += `
<div class="film-item">${filmInput.value}</div>
`
filmInput.value = ''
})
Console
/index.html
-5:26