To do this, it uses the isPrime(n) function, which implements the Sieve of Eratosthenes algorithm to check if the given number n has any divisors except for 1 and itself. Then, it starts a loop from start with a step of 2 and in this loop, it tests whether the current number is prime. First, it checks if the start value (specified in options) is odd if it's not, it adds 1 to it (prime numbers can't be even). This prime number list generator works entirely in your browser and is written in JavaScript. How Does This Prime Number Sequence Generator Work?