Created
June 1, 2015 21:57
-
-
Save juanbrujo/d5080b615853d633e494 to your computer and use it in GitHub Desktop.
Get a random value between 2 ranges
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
| // JS Function expressed in Jade lang. | |
| - var randBetweenValues = function(min,max){ | |
| - return Math.floor(Math.random() * (max - min + 1) + min); | |
| - } | |
| // USE: | |
| p #{randBetweenValues(205,215)} | |
| // OUTPUT: | |
| <p>209</p> | |
| ... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment