0
It totally bugged out
If you put a number that not starts with "0." it will also keep showing, and if you put random zero's it will also stay. is this just a Math.random() fault? https://code.sololearn.com/WWOSf1csuhwA/?ref=app
4 Réponses
+ 2
function RandomRange(min,max){
return Math.floor(Math.random() * (++max-min) + min);
}
I think that is what you want.
+ 2
You define min and max when you call the function.
console.log (RandomRange(0,100));
That way you can change is as you need it. min is the smallest number your random number can be and max is the biggest it can be.
0
min and max are not defined?
0
thanks