const EYES = document.querySelectorAll("img.reveal-password"); EYES.forEach((eye) => eye.addEventListener("click", () => { if (eye.previousElementSibling.type === "password") { eye.previousElementSibling.type = "text"; eye.src = "/public/img/icon/not_eye.svg"; eye.alt = "icon not eye"; } else { eye.previousElementSibling.type = "password"; eye.src = "/public/img/icon/eye.svg"; eye.alt = "icon eye"; } }));