0

random?

im making a game and i want to make a random function that picks a random number between 1 and 100, but im using the normal random function and its not identified, how do i do a random function?

23rd Dec 2018, 5:55 PM
YeetusYeetus
YeetusYeetus - avatar
2 Answers
+ 3
Try Math.random()*100 | 0 + 1
23rd Dec 2018, 5:59 PM
ŠœŠøŠŗŠ¾Š»Š° Š¤ŠµŠ“Š¾ŃŃ”Ń”Š²
ŠœŠøŠŗŠ¾Š»Š° Š¤ŠµŠ“Š¾ŃŃ”Ń”Š² - avatar
0
in javascript?
23rd Dec 2018, 5:59 PM
YeetusYeetus
YeetusYeetus - avatar