feat: Implementa Desafio 2.5

This commit is contained in:
Sabrina Miranda 2022-10-28 19:09:14 -03:00
parent 57e6d1cd75
commit 816278d712

View File

@ -1,4 +1,11 @@
export function isPrime(value) {
// implementar logica aqui
if(value == 1) return false;
for(let divisor = 2 ; divisor < value ; divisor++) {
if(value % divisor == 0) {
return false;
}
}
return true;
}