Thursday, 12 August 2010

Math.random()

Note to self... for a three number 100 - 999



var min = 100
var max = 1000
Math.floor(Math.random()*(max-min)+min)

No comments:

Post a Comment

 

Note: the opinions on this page don't represent that of my employer in anyway. And, actually only vaguely represent my opinions on the date of publication. (Unlike Ms T, I am very much for turning)