Skip to content

Instantly share code, notes, and snippets.

@zhangll
Created September 12, 2013 23:53
Show Gist options
  • Save zhangll/6545330 to your computer and use it in GitHub Desktop.
Save zhangll/6545330 to your computer and use it in GitHub Desktop.
/**
* 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