Posted By

aperazzi on 12/10/11


Tagged

js


Versions (?)

Generate random number between two integers


 / Published in: Other
 

Generate random number between two integers

  1. var lower = 2;
  2. var higher = 10;
  3. var randomNum = Math.round(Math.random() * (higher - lower)) + lower;

Report this snippet  

You need to login to post a comment.