- go to step 2
- go to step 3
HTML
<yourTag id="yourId"></yourTag>
JavaScript
let yourVariable = document.getElementById(`yourId`)
let yourVariable = document.getElementById(`yourId`) yourVariable.addEventListener(`click`, yourFunction)
yourVariable.addEventListener(`click`, yourFunction)
function yourFunction() {
// your code here
}
console.log your variables and check that they have the expected values