Created
September 23, 2014 12:31
-
-
Save pixelhijack/8532eca4d27cb5eed4ad to your computer and use it in GitHub Desktop.
random string
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 RandomString(length) { | |
var str = ''; | |
for ( ; str.length < length; str += Math.random().toString(36).substr(2) ); | |
return str.substr(0, length); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment