Get Random Between in JavaScript

If you wanted to get between 1 and 6, you would calculate:

Math.floor(Math.random() * 6) + 1  

Where:

1 is the start number
6 is the number of possible results (1 + start (6) – end (1))

http://stackoverflow.com/questions/4959975/generate-random-number-between-two-numbers-in-javascript