Merge pull request 'feat(isPrime): funcao feita' (#5) from feature/isPrime into development

Reviewed-on: #5
This commit is contained in:
Nicolly Vieira Santos Costa 2022-10-28 17:58:09 +00:00
commit c00b0fd928

View File

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