Created
June 15, 2015 06:08
-
-
Save Nateowami/f7de43dd20fd35207677 to your computer and use it in GitHub Desktop.
PIN Generator
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
// Released into the public domain | |
// Set this to the number of digits you want in your PIN | |
var pinDigits = 4; | |
var pin = ""; | |
function random(){ | |
return Math.floor(Math.random()*10); | |
} | |
for (var i = 0; i < pinDigits; i++){ | |
pin += random(); | |
} | |
alert(pin); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment