This is my solution
//find all prime numbers
function showMePrimeNumbers(start, end){
var primes = [];
for(var number = start; number < end; number++){
var primeNumberDividers = []; //there should only be 2: 1 & number
for(var divider = 1; divider <= number; divider++){
if(number % divider === 0){
primeNumberDividers.push(divider);
}
}
if(primeNumberDividers.length === 2){
primes.push(number);
}
}
return primes;
}
console.log(showMePrimeNumbers(1, 100));