+ 1

What's the error in addEventListener

const btn = document.getElementById("btn"); const menu = document.getElementById("menu"); btn.addEventListener("click", ()=>{ if (btn.checked == true){ menu.classList.add("active"); }else {menu.classList.remove("active");} })

9th May 2021, 2:19 PM
‏‪Talbi Abderraouf‬‏
‏‪Talbi Abderraouf‬‏ - avatar
1 Respuesta
9th May 2021, 2:50 PM
Matias
Matias - avatar