How the numbers are made
Computers cannot flip coins, so most generate pseudo-random numbers from a formula and a starting seed. JavaScript's everyday Math.random() is fast but predictable enough that it should not be used for anything that matters. This page uses crypto.getRandomValues(), the generator browsers provide for encryption keys, which is seeded from the operating system's entropy pool.
Turning random bits into a range fairly takes one more step. Taking the remainder (random % 6) favours small numbers slightly whenever the range does not divide evenly into 2³². We use rejection sampling instead: draws that fall in the uneven top slice are thrown away and redrawn, so every value has exactly the same chance.
Unique numbers and shuffles
With "no repeats" each number can come up only once, like balls taken from a drum. For large ranges the generator redraws duplicates; when you ask for most of a range it shuffles the whole range with the Fisher-Yates method and takes the first numbers, which is equally fair and faster.
What lottery odds mean for your money
At 1 in 292 million, buying one Powerball ticket twice a week for 50 years gives about a 1 in 56,000 chance of ever hitting the jackpot. Powerball puts about half of each ticket's price into the prize pool, so a $2 ticket is worth roughly $1 in expected winnings. The same $4 a week invested at 7% for 40 years grows to about $46,000. The compound interest calculator shows how.