Last active
June 15, 2020 16:38
-
-
Save maestrow/cfe6182862481e54e3640e76d0959063 to your computer and use it in GitHub Desktop.
Passsword generator bookmarklet (javascript)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript:(function() { | |
var lowers = 'abcdefghijklmnopqrstuvwxyz'; | |
var uppers = lowers.toUpperCase(); | |
var nums = '123456789'; | |
var alphabeet = lowers + uppers + nums; | |
var pass = ''; | |
for (var i = 0; i<8; i++) { | |
var x = Math.floor(Math.random() * alphabeet.length); | |
pass += alphabeet[x]; | |
} | |
prompt('Password: ', pass); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment