feat(isPrime): algoritmo concluido

This commit is contained in:
Mateus Antonio Rodrigues Lopes 2022-10-31 21:28:46 -03:00
parent 33e8ba9be7
commit 13279da8b3

View File

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