Why not `Math.floor(Math.random() * 10000)`.  Math.random is inclusive of the lower bound, but exclusive of the upper bound.  I don't mind that the number could be under 1000, I just don't like the `max - min` part which is always 8999.