Originally Posted by Philip M
There is no point in imposing a limit to the number of password attempts as the user can simply close the page, reopen it and start again.
And be aware that anyone can see the correct password with View Source.
But to make your code work you need to use a for loop.
Its just homework for me so just for knowledge purpose.I tried with for but i didn't work.