I am able to generate Random number from 0 to 10 using below code snippet, but I want frequency of 0 and 1 to be less when compared to any other number.
Math.floor(Math.random() * 10)
That would be great if someone provides me the solution without having external conditions to it.
Aucun commentaire:
Enregistrer un commentaire