Skip to content

Instantly share code, notes, and snippets.

@thebigbad
Created January 6, 2011 21:10
Show Gist options
  • Select an option

  • Save thebigbad/768585 to your computer and use it in GitHub Desktop.

Select an option

Save thebigbad/768585 to your computer and use it in GitHub Desktop.
make 20 char pass in js
var genPass = function () {
var pass = '';
var len = 20;
while (len--) {
pass += String.fromCharCode(Math.floor(Math.random() * 95) + 32);
}
return pass;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment