Skip to content

Instantly share code, notes, and snippets.

@juanbrujo
Created June 1, 2015 21:57
Show Gist options
  • Select an option

  • Save juanbrujo/d5080b615853d633e494 to your computer and use it in GitHub Desktop.

Select an option

Save juanbrujo/d5080b615853d633e494 to your computer and use it in GitHub Desktop.
Get a random value between 2 ranges
// 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