Created
May 29, 2010 12:29
-
-
Save premasagar/418254 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
// random number. Default: maximum of 4 digits | |
function rand(maxDigits){ | |
var m = Math; | |
return m.floor( | |
m.random() * m.pow(10, maxDigits || 4) | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment