feat(isPrime): algoritmo criado. #5

Merged
luizfelipe9627 merged 1 commits from feature/algorithm05 into development 2022-11-01 01:24:59 +00:00

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;
else if(value === 2) return true;
}
return value > 1;
} }