Randomness of Prime Numbers
Prime numbers, in ascending order, are:
Because prime numbers are so random in their progression,
they are very difficult to predict as they get larger.
Hence writing a JavaScript code to list prime numbers will involve checking
every number in a range of interest and gathering those that are
without factors.
Say we want to list all prime numbers between 2 and 100 inclusive,
we would start from 2; check to see whether it has any factors;
keep it as a prime number if it has no factors; otherwise discard it.
We would then go to 3, and repeat the same process.
Repeat same for 4, 5, 6, 7, ..., 98, 99, 100.