mercredi 22 juin 2022

What will Math.floor(Math.random() * 10 + 1); do [duplicate]

I came across the following command:

Math.floor(Math.random() * 10 + 1); 

I understand that Math.floor() will convert to the lowest integer, but what does Math.random() * 10 + 1 do?




Aucun commentaire:

Enregistrer un commentaire