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?
Math.floor()
Math.random() * 10 + 1
Aucun commentaire:
Enregistrer un commentaire