Last active
August 29, 2015 14:02
-
-
Save dmi3y/7795e59142a49445ea33 to your computer and use it in GitHub Desktop.
Random-ish string 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
function rand () { | |
var | |
randArr = ( '' + (Math.random() * 1e+20)).split('').slice(0, 5); | |
randArrLen = randArr.length; | |
randStr = ''; | |
for( ;randArrLen--; ) { | |
randStr += String.fromCharCode(11 + randArr[randArrLen]); | |
} | |
return randStr; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment