I want to create password toggle function when clicked on the eye icon using Javascript only. I have written code for it but it works only to show the password text and not
The variable "pwShown" is misspelled (as "pwShow") in the else section of your Javascript code. Therefore, pwShown never gets reset to 0.