I want to generate a random number between 1 and 10 up to 2 decimal places,
I'm currently using this below to generate my numbers,
var randomnum = Math.floor(Math.random() * (10.00 - 1.00 + 1.00)) + 1.00;
Ultimately, I would like to know how to generate numbers like:
1.66
5.86
8.34
In the format: var randomnum = then the code
sidenote: I don't remember why I previously had generated my numbers like that but remember something about Math.random generating numbers to 8 decimal places.
Thank you for the help! :)
Ps: I've seen a lot of posts about waiting to round down or up generated numbers and haven't found one wanting to generate them straight out.
UPDATE: I want a number value not a string that looks like a number