🚨
Spoiler alert: This post contains spoilers for Project Euler.
Problem 10

Sum of Primes Less Than 2 Million
Approach
This looks like another opportunity to use the Sieve of Eratosthenes. I can basically recycle my answer from Problem 7.
Using the sieve, we can filter out all the non-primes less than 2,000,000. We'll maintain an array where 0 represents a composite and 1 represents a prime number. Then we can sum the indices of the array where i == 1.
JS Solution
Conclusion
The Sieve of Eratosthenes proves useful again. I've read that prime sieves come up often in these problems. Will be interesting to get to a point where a more advanced sieve is necessary.