Created
December 29, 2014 17:15
-
-
Save rumblestrut/12dbcfc45874f29a3322 to your computer and use it in GitHub Desktop.
Random number generator (1 to 10)
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
| var bigDecimal = Math.random(); | |
| var improvedNum = (bigDecimal * 10) + 1; | |
| var randomNumber = Math.floor(improvedNum); | |
| alert(randomNumber); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment