Project Name: Mega Billions( Clone of Megamillions )
Project Link: https://megabillions.ga/
Source-code link: ryanbest99.github.io/mega-billions at master · ryanbest99/ryanbest99.github.io · GitHub
[Problems I want to solve]
- Each white ball number MUST be unique (no duplicates)
- List the numbers in order…
[Description]
Hey guys, I’m trying to make a mega-million clone web service using JS.
To pick the random number for each ball, I used ‘Math.random()’ on each ball. (White balls: 1-70 / Yellow-ball: 1-26)
However, it causes two issues that I don’t know how to solve.
- Currently, the numbers can be duplicated ( like 26, 26, 26, 26, 27, 21)
- The numbers are not in numerical order.
Thank you in advance for your help!