i found this pretty general client-side password script. nowhere near fluent in jscript, i understand the gist of it, but i'm having one problem involving a variable.
basicly, it asks for the first letter of the passwort variable. then it asks for the position letter in the code variable, returns that and throws it into a for loop, returning a new ist value. my question is, "how does the combination of empty quotes and a window.promp in the passwort variable figure into the charAt method and for loop?"
var ist=0;
var i=0;
var code="!#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMN OPQRSTUVWXYZ[\]^_abcdefghijklmnopqrstuvw xyz{|}";
var passwort = "" + window.prompt("Passwort für Adressen:","");
if (passwort.length) {
for (i=0; i<=passwort.length-1; i++)
ist=ist+(i+1)*code.indexOf(passwort.charAt(i)); basicly, it asks for the first letter of the passwort variable. then it asks for the position letter in the code variable, returns that and throws it into a for loop, returning a new ist value. my question is, "how does the combination of empty quotes and a window.promp in the passwort variable figure into the charAt method and for loop?"
