Posted By

tomdowning on 09/21/11


Tagged

random


Versions (?)

Javascript random between


 / Published in: JavaScript
 

  1. function randomFromTo(from, to){
  2. return Math.floor(Math.random() * (to - from + 1) + from);
  3. }

Report this snippet  

You need to login to post a comment.