lundi 3 juin 2019

Generate a random number between two decimal numbers

I have to generate a random number in a range between 0.1 and 1.5. What could be the exact command?

const random = +(Math.random() * ((1.5- 0.1) + 0.1)).toFixed(1);




Aucun commentaire:

Enregistrer un commentaire