
function eratosthene(n)
{
	let primes = [];
	let filterArray = [];
	for(let i = 2; i <=n; i++){
		// TODO
	}
	return primes;
}

function eratosthene1(n)
{
	let numbers = Array.from({length : n - 2}, (v,k) => k + 2);
	let p ,primes = [];

	while(numbers.length){
		[p,...numbers] = numbers;
		numbers = numbers.filter( x => x%p != 0);
		primes = [...primes,p];
	}
	return primes;
}
