const togglePw = (el) => { const input = el.closest('.js-psw-toggle')?.querySelector('input'); if (input) { input.type = input.type == 'password' ? 'text' : 'password'; } // the end2 }