Created
September 12, 2013 23:53
-
-
Save zhangll/6545330 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
/** | |
* get random symbol | |
*/ | |
function getSameSymbol(theSymbol,maxLength){ | |
var symbols = [] | |
for (var i = 0; i < Math.floor(Math.random()*maxLength); i++) { | |
symbols.push(theSymbol); | |
} | |
return symbols.join('') | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment