Created
August 25, 2010 12:12
-
-
Save hmert/549378 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
// rastgele rakamlı harfli değer üretir. | |
var randomString = function(numchars) { | |
var chars = "0123456789ABCDEFGHJKMNPQRSTUVWXYZabcdefghkmnpqrstuvwxyz"; | |
var randomstring = ''; | |
for (var i=0; i<numchars; i++) { | |
var rnum = Math.floor(Math.random() * chars.length); | |
randomstring += chars.substring(rnum,rnum+1); | |
} | |
return randomstring; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Neden bilmiyorum bana çok tanıdık geldik :)