Math.floor(Math.random() * (max - min + 1) + min)
Math.ceil(Math.random() * (max - min + 1) + min - 1)
Note: There is a minute possibility that this function will return (min-1). This is why floor is a better choice.
Math.round(Math.random() * (max - min) + min)
This script was inspired by Duncan Crombie's Useful JavaScript - Random Numbers