Validation
Someone please explain this code. It find the list of prime numbers from 0 to max. I don't understand what !store[i] means and how if statement validates it since store is an empty array and the value of store[i] when i is an integer should be undefined because the array is empty. Secondly I don't understand the use of the bitwise operator << is the second loop. Thank you. function primeFactorsTo(max) { var store = [], i, j, primes = []; for (i = 2; i <= max; ++i) { if (!store[i]) { primes.push(i); for (j = i << 1; j <= max; j += i) { store[j] = true; } } } return primes; } console.log(primeFactorsTo(5)); // 2,3,5 console.log(primeFactorsTo(15)); // 2,3,5,7,11,13