Prime Sieve of Eratosthenes Algorithm in Javascript