Skip to content

Instantly share code, notes, and snippets.

@gregorypratt
Last active December 15, 2015 06:09
Show Gist options
  • Save gregorypratt/5214185 to your computer and use it in GitHub Desktop.
Save gregorypratt/5214185 to your computer and use it in GitHub Desktop.
Use JavaScript to create a simple random (but not unique!) 5 length character set between 10000 and zzzzz, useful for pins or shortened URLs etc.
var pin = (Math.floor(Math.random() * 60466175) + 1679615).toString(36);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment