Prime Number Generator

About:

This is is something I have made before in Scratch. Even though I am still proud of the optimizations on it, I wanted faster!
So some years later (now) I made this. A prime number generator that uses the prime numbers them self to be faster. How you ask?
(If you can javascript code then you can read here: code)
When you divide a number by 2 example and you get a decimal. You will get a decimal when dividing on the same number with 4 or 6 or 8 or 10 or 12........or 214912476.....You get the point. This makes it so that you only need to divide the numbers with primes to find if the number is prime. That is how I optimized the this code.
If you know any other optimizations please let me know 😺