Advertisement
Guest User

Untitled

a guest
Aug 20th, 2019
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. // Example
  2. function ourRandomRange(ourMin, ourMax) {
  3.  
  4. return Math.floor(Math.random() * (ourMax - ourMin + 1)) + ourMin;
  5. }
  6.  
  7. ourRandomRange(1, 9);
  8.  
  9. // Only change code below this line.
  10.  
  11. function randomRange(myMin, myMax) {
  12.  
  13. return Math.floor(Math.random() * (myMax - myMin + 1)) + myMin; // Change this line
  14.  
  15. }
  16.  
  17. // Change these values to test your function
  18. var myRandom = randomRange(5, 15);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement