Posted By

Waltem on 10/09/15


Tagged

random


Versions (?)

random int between two numbers


 / Published in: JavaScript
 

random integer between two numbers

  1. function randomIntBetween(min, max) {
  2. return Math.round(Math.random() * (max - min) + min);
  3. }
  4.  
  5. // randomIntBetween(1,100);

Report this snippet  

You need to login to post a comment.