Get a random number focused on center

Is it possible to get a random number between 1-100 and keep the results mainly within the 40-60 range? I mean, it will go out of that range rarely, but I want it to be mainly within that range… Is it possible with JavaScript/jQuery?

Right now I’m just using the basic Math.random() * 100 + 1.

20 Answers
20

Leave a Comment