Hi,
Are there any other best practices to get an HTML element by class name?
let left = document.getElementsByClassName("pro-left"); for (let i = 0; i < right.length; i++) { left[i].addEventListener("click", function () { console.log("Clicked"); } }