feat: finalizado isPrime

This commit is contained in:
Vitor Soares 2022-10-28 11:51:46 -03:00
parent bfdc578044
commit 58d5a12222

View File

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