0
Js random number generator
How to choose a random number from a highest / lowest range?
4 Answers
+ 2
[theory] Math.random() returns a floating-point value between 0 and 1 (or 0% and 100%).
Multiply the range by this "percentage", then shift the answer by the lowest number.
Math.random() * range + lowest_permissable_number
+ 2
MATH ISNT DEFINED
+ 1
You can use Math.random() which returns a random number between 0 and1
Use Math.floor((Math.random() *Â 100) +Â 1) to get random number between 1 and 100
+ 1
thanks guys