Created
January 14, 2011 05:18
-
-
Save Nutrox/779208 to your computer and use it in GitHub Desktop.
AS3 - Random capital letter.
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
const CHR:Array = [ | |
"A","B","C","D","E","F","G","H","I","J","K","L","M", | |
"N","O","P","Q","R","S","T","U","V","W","X","Y","Z" | |
]; | |
const CHRLEN:Number = CHR.length; | |
function getRandom():String { | |
return CHR[ CHRLEN * Math.random() >> 0 ]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment