Prime Numbers and the Sieve of Eratosthenes

A friend of mine pointed me to Harvey Mudd's CS for All, and I fell madly in love with this section, in particular: The Sieve of Eratosthenes

In fact, I believe my exact words upon learning about this method of finding primes was, "WHERE HAS THIS BEEN ALL MY LIFE?!" 

Now I'm working on a function to implement it in JavaScript, and it's super fun. 

Highly recommend checking out the Harvey Mudd link -- it's an awesome CS resource.